diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 2004-05-27 13:31:16 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 2004-05-27 13:31:16 +0000 |
commit | cc09a897eee7c7eabebd4c087e62ace1c796e6af (patch) | |
tree | 2921f37dc92be4e8d100321053824bae3692a5a9 | |
parent | 7351b0acf86ca44a683d4c32fba2ec56328a92ac (diff) | |
download | src-cc09a897eee7c7eabebd4c087e62ace1c796e6af.tar.gz src-cc09a897eee7c7eabebd4c087e62ace1c796e6af.zip |
Fix an off-by-one error in the range check for the maximal -i or -o
block size.
Notes
Notes:
svn path=/head/; revision=129779
-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 82f6c1c3c487..425b782d2d33 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); |