"e2freefrag -c 0" doesn't make much sense, so abort with an error
message if the user specifies a zero chunksize.
Addresses-Coverity-Bug:
1633767
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit
3e059df08de94abde1ddd82008d0658584a35e5e)
switch (c) {
case 'c':
chunk_info.chunkbytes = strtoull(optarg, &end, 0);
- if (*end != '\0') {
+ if (*end != '\0' || chunk_info.chunkbytes == 0) {
fprintf(stderr, "%s: bad chunk size '%s'\n",
progname, optarg);
usage(progname);