summaryrefslogtreecommitdiff
path: root/files.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2016-11-22 21:31:40 +0100
committerRobert Swiecki <robert@swiecki.net>2016-11-22 21:31:40 +0100
commita81f317780cf1581dba9e63d38caf3715365f503 (patch)
tree8962bc856333ff16c0d29727bc382826660dd23f /files.c
parent92ec8d2d338e6917bdfb9ced239a54aba2f6c59f (diff)
downloadhonggfuzz-a81f317780cf1581dba9e63d38caf3715365f503.tar.gz
Minimal undefined file size is 128 bytes
Diffstat (limited to 'files.c')
-rw-r--r--files.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/files.c b/files.c
index e2a6e3df..9cd5ac7b 100644
--- a/files.c
+++ b/files.c
@@ -211,7 +211,11 @@ static bool files_readdir(honggfuzz_t * hfuzz)
}
if (hfuzz->maxFileSz == 0UL) {
- hfuzz->maxFileSz = maxSize;
+ if (maxSize < 128U) {
+ hfuzz->maxFileSz = 128U;
+ } else {
+ hfuzz->maxFileSz = maxSize;
+ }
}
LOG_I("%zu input files have been added to the list. Max file size: %zu", hfuzz->fileCnt,
hfuzz->maxFileSz);