From 066d65d8469ca504ab86771bd8e5e608efec9517 Mon Sep 17 00:00:00 2001 From: Luca Di Bartolomeo Date: Fri, 27 May 2022 17:55:21 +0200 Subject: Fix wrong memchr size in android (#1429) Need to fix this otherwise ASAN will always complain about heap buffer overflows and refuse to run. Co-authored-by: van Hauser --- src/afl-fuzz-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/afl-fuzz-stats.c') diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 5b237748..3e034b83 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -59,7 +59,7 @@ void write_setup_file(afl_state_t *afl, u32 argc, char **argv) { if (i) fprintf(f, " "); #ifdef __ANDROID__ - if (memchr(argv[i], '\'', sizeof(argv[i]))) { + if (memchr(argv[i], '\'', strlen(argv[i]))) { #else if (index(argv[i], '\'')) { -- cgit 1.4.1