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:
Hiltjo Posthuma 2015-03-30 19:58:06 +02:00
parent 27f258dd34
commit d583d12300
1 changed files with 1 additions and 1 deletions

2
du.c
View File

@ -94,7 +94,7 @@ main(int argc, char *argv[])
bsize = getenv("BLOCKSIZE");
if (bsize)
blksize = estrtonum(bsize, 0, MIN(LLONG_MAX, SIZE_MAX));
blksize = estrtonum(bsize, 1, MIN(LLONG_MAX, SIZE_MAX));
if (kflag)
blksize = 1024;