aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgnbon <kiddo.pwn@gmail.com>2024-03-14 11:00:59 +0900
committergnbon <kiddo.pwn@gmail.com>2024-03-14 11:00:59 +0900
commit1860f6e594883965f7b630a65d5a77006f284aa1 (patch)
tree17f000568ad6daafe88b32a0400c1ac5a85fb6ea /src
parentc9ad3acc9b69daea5e99b6ef66ed1f593331d474 (diff)
downloadafl++-1860f6e594883965f7b630a65d5a77006f284aa1.tar.gz
Fix invalid range for del_len_limit
Diffstat (limited to 'src')
-rw-r--r--src/afl-tmin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index 03e70a6f..994174ed 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -82,7 +82,7 @@ static u8 crash_mode, /* Crash-centric mode? */
remove_shm = 1, /* remove shmem on exit? */
debug; /* debug mode */
-static u32 del_len_limit; /* Minimum block deletion length */
+static u32 del_len_limit = 1; /* Minimum block deletion length */
static volatile u8 stop_soon; /* Ctrl-C pressed? */
@@ -423,7 +423,6 @@ next_pass:
del_len = next_pow2(in_len / TRIM_START_STEPS);
stage_o_len = in_len;
- if (!del_len_limit) { del_len_limit = 1; }
ACTF(cBRI "Stage #1: " cRST "Removing blocks of data...");
@@ -1070,7 +1069,7 @@ int main(int argc, char **argv_orig, char **envp) {
del_len_limit = atoi(optarg);
- if (del_len_limit < 1 || del_len_limit >= TMIN_MAX_FILE) {
+ if (del_len_limit < 1 || del_len_limit > TMIN_MAX_FILE) {
FATAL("Value of -l out of range between 1 and TMIN_MAX_FILE");