From d583d12300a8990715824857400aaa7f66699333 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Mon, 30 Mar 2015 19:58:06 +0200 Subject: [PATCH] du: fix possible division by zero if $BLOCKSIZE is 0 these kind of $BLOCKSIZE dont make sense, but dont crash atleast. --- du.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du.c b/du.c index b20201a..0bc732b 100644 --- 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;