Skip to content

Commit

Permalink
gdi I'm really dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
addisoncrump committed Feb 20, 2023
1 parent 04ef0f6 commit 3e62846
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libafl_targets/src/sancov_cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1,
if (result != 0) {
uintptr_t k = (uintptr_t)called_pc;
k = (k >> 4) ^ (k << 8);
k &= CMPLOG_MAP_W - 1;

__libafl_targets_cmplog_routines_len(k, s1, s2, n);
}
Expand All @@ -133,6 +134,7 @@ void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1,
if (result != 0) {
uintptr_t k = (uintptr_t)called_pc;
k = (k >> 4) ^ (k << 8);
k &= CMPLOG_MAP_W - 1;

size_t actual_len;
for (actual_len = 0; actual_len < n; actual_len++) {
Expand All @@ -153,6 +155,7 @@ void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1,
if (result != 0) {
uintptr_t k = (uintptr_t)called_pc;
k = (k >> 4) ^ (k << 8);
k &= CMPLOG_MAP_W - 1;

size_t actual_len;
for (actual_len = 0;; actual_len++) {
Expand Down

0 comments on commit 3e62846

Please sign in to comment.