du: fix possible division by zero if $BLOCKSIZE is 0
these kind of $BLOCKSIZE dont make sense, but dont crash atleast.
This commit is contained in:
parent
27f258dd34
commit
d583d12300
2
du.c
2
du.c
|
@ -94,7 +94,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
bsize = getenv("BLOCKSIZE");
|
bsize = getenv("BLOCKSIZE");
|
||||||
if (bsize)
|
if (bsize)
|
||||||
blksize = estrtonum(bsize, 0, MIN(LLONG_MAX, SIZE_MAX));
|
blksize = estrtonum(bsize, 1, MIN(LLONG_MAX, SIZE_MAX));
|
||||||
if (kflag)
|
if (kflag)
|
||||||
blksize = 1024;
|
blksize = 1024;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user