about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-01-18 14:33:06 +0100
committervanhauser-thc <vh@thc.org>2023-01-18 14:33:06 +0100
commit22f757a169d3da3081306c0f861ef99a509073fe (patch)
treebf20e420dca042baeea85dc5efe42e8c13657718
parent0db662db7b433a08b01de7f5a989843450919b88 (diff)
downloadafl++-22f757a169d3da3081306c0f861ef99a509073fe.tar.gz
fix
-rw-r--r--custom_mutators/autotokens/autotokens.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/custom_mutators/autotokens/autotokens.cpp b/custom_mutators/autotokens/autotokens.cpp
index 94f86413..7aecb010 100644
--- a/custom_mutators/autotokens/autotokens.cpp
+++ b/custom_mutators/autotokens/autotokens.cpp
@@ -129,7 +129,7 @@ extern "C" size_t afl_custom_fuzz(my_mutator_t *data, u8 *buf, size_t buf_size,
 
           new_item = rand_below(afl_ptr, current_id);
 
-        } while (new_item >= whitespace_ids);
+        } while (!alternative_tokenize && new_item >= whitespace_ids);
 
         u32 pos = rand_below(afl_ptr, m_size + 1);
         m.insert(m.begin() + pos, new_item);