improve cmplog

This commit is contained in:
vanhauser-thc
2023-11-28 10:26:37 +01:00
parent dd9a04c901
commit 74f8ca6b46
4 changed files with 35 additions and 21 deletions

View File

@ -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;