diff options
author | vanhauser-thc <vh@thc.org> | 2023-11-28 16:32:36 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-11-28 16:32:36 +0100 |
commit | 39be50e2a80443224cc781e4630714df977f52c0 (patch) | |
tree | 44571bc9ac5f3d41c1195580411e0ccbb8900a77 | |
parent | 74f8ca6b468b6d89e8d588e3835486be48184893 (diff) | |
download | afl++-39be50e2a80443224cc781e4630714df977f52c0.tar.gz |
nit
-rw-r--r-- | src/afl-fuzz-redqueen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c index c0ea5005..9e9b3822 100644 --- a/src/afl-fuzz-redqueen.c +++ b/src/afl-fuzz-redqueen.c @@ -1379,7 +1379,7 @@ static u8 cmp_extend_encoding(afl_state_t *afl, struct cmp_header *h, new_vall += (scale_len << 2) + 3; ilen = scale_len + 5; - if (ilen <= its_len) { + if (ilen <= its_len && ilen > 1) { u8 tmpbuf[32]; memcpy(tmpbuf, buf + idx, ilen); @@ -1403,7 +1403,7 @@ static u8 cmp_extend_encoding(afl_state_t *afl, struct cmp_header *h, if (do_call) { - if (ilen <= its_len) { + if (ilen <= its_len && ilen > 1) { u8 tmpbuf[32]; memcpy(tmpbuf, buf + idx, ilen); @@ -1421,7 +1421,7 @@ static u8 cmp_extend_encoding(afl_state_t *afl, struct cmp_header *h, } - // here we add and subract 1 from the value, but only if it is not an + // here we add and subtract 1 from the value, but only if it is not an // == or != comparison // Bits: 1 = Equal, 2 = Greater, 4 = Lesser, 8 = Float // 16 = modified float, 32 = modified integer (modified = wont match |