mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
Fix an off-by-one error in the range check for the maximal -i or -o
block size.
This commit is contained in:
parent
7351b0acf8
commit
cc09a897ee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129779
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user