about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-11-28 10:26:37 +0100
committervanhauser-thc <vh@thc.org>2023-11-28 10:26:37 +0100
commit74f8ca6b468b6d89e8d588e3835486be48184893 (patch)
treea3b43e791297bd5b7daa517a4166926801a410f1 /src
parentdd9a04c901c79fe2f3f078de6cc0777e3a5d96df (diff)
downloadafl++-74f8ca6b468b6d89e8d588e3835486be48184893.tar.gz
improve cmplog
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-redqueen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c
index 13f164f5..c0ea5005 100644
--- a/src/afl-fuzz-redqueen.c
+++ b/src/afl-fuzz-redqueen.c
@@ -1906,6 +1906,8 @@ static u8 cmp_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u8 *cbuf,
 
 #endif
 
+  if (hshape < 2) { return 0; }
+
   for (i = 0; i < loggeds; ++i) {
 
     struct cmp_operands *o = &afl->shm.cmp_map->log[key][i];
@@ -2698,6 +2700,8 @@ static u8 rtn_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u8 *cbuf,
 
   hshape = SHAPE_BYTES(h->shape);
 
+  if (hshape < 2) { return 0; }
+
   if (h->hits > CMP_MAP_RTN_H) {
 
     loggeds = CMP_MAP_RTN_H;