diff options
author | joerg <joerg@FreeBSD.org> | 2004-05-27 13:31:16 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2004-05-27 13:31:16 +0000 |
commit | 257067641e31a4358d833397b22abb7863512df9 (patch) | |
tree | 2921f37dc92be4e8d100321053824bae3692a5a9 /usr.sbin/smbmsg | |
parent | dd38c5bf3a1351417d58e8059e7860d056e40c29 (diff) | |
download | FreeBSD-src-257067641e31a4358d833397b22abb7863512df9.zip FreeBSD-src-257067641e31a4358d833397b22abb7863512df9.tar.gz |
Fix an off-by-one error in the range check for the maximal -i or -o
block size.
Diffstat (limited to 'usr.sbin/smbmsg')
-rw-r--r-- | usr.sbin/smbmsg/smbmsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smbmsg/smbmsg.c b/usr.sbin/smbmsg/smbmsg.c index 82f6c1c..425b782 100644 --- a/usr.sbin/smbmsg/smbmsg.c +++ b/usr.sbin/smbmsg/smbmsg.c @@ -249,7 +249,7 @@ main(int argc, char **argv) case 'i': if ((iflag = getnum(optarg)) == -1) errx(EX_USAGE, "Invalid number: %s", optarg); - if (iflag < 0 || iflag >= SMB_MAXBLOCKSIZE) + if (iflag < 0 || iflag > SMB_MAXBLOCKSIZE) errx(EX_USAGE, "# input bytes out of range: %d", iflag); @@ -258,7 +258,7 @@ main(int argc, char **argv) case 'o': if ((oflag = getnum(optarg)) == -1) errx(EX_USAGE, "Invalid number: %s", optarg); - if (oflag < 0 || oflag >= SMB_MAXBLOCKSIZE) + if (oflag < 0 || oflag > SMB_MAXBLOCKSIZE) errx(EX_USAGE, "# output bytes out of range: %d", oflag); |