commit d583d12300a8990715824857400aaa7f66699333
parent 27f258dd3483ba894e047f9394fdf8c484e14b48
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 30 Mar 2015 19:58:06 +0200
du: fix possible division by zero if $BLOCKSIZE is 0
these kind of $BLOCKSIZE dont make sense, but dont crash atleast.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/du.c b/du.c
@@ -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;