mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Set "max" to a reasonable value if BLOCKSIZE has a bogus unit. Prior
to this commit, "env BLOCKSIZE=4X df" prints not only "4X: unknown blocksize" as expected, but sometimes also "maximum blocksize is 1G" and "minimum blocksize is 512" depending on what happened to be on the stack. Found by: LLVM/Clang Static Checker
This commit is contained in:
parent
d59e8ae886
commit
cb8330d036
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181280
@ -83,6 +83,7 @@ getbsize(headerlenp, blocksizep)
|
||||
default:
|
||||
fmterr: warnx("%s: unknown blocksize", p);
|
||||
n = 512;
|
||||
max = MAXB;
|
||||
mul = 1;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user