From 54a312a5fe7d83fcee8b420868bc918622e9b3a6 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Fri, 13 Nov 2020 00:44:08 +0100 Subject: more small fixes --- qemu_mode/libcompcov/pmparser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu_mode/libcompcov/pmparser.h') diff --git a/qemu_mode/libcompcov/pmparser.h b/qemu_mode/libcompcov/pmparser.h index 9421d47e..1a3d8834 100644 --- a/qemu_mode/libcompcov/pmparser.h +++ b/qemu_mode/libcompcov/pmparser.h @@ -108,7 +108,6 @@ void pmparser_print(procmaps_struct *map, int order); procmaps_iterator *pmparser_parse(int pid) { - procmaps_iterator *maps_it = malloc(sizeof(procmaps_iterator)); char maps_path[500]; if (pid >= 0) { @@ -129,6 +128,7 @@ procmaps_iterator *pmparser_parse(int pid) { } + procmaps_iterator *maps_it = malloc(sizeof(procmaps_iterator)); int ind = 0; char buf[PROCMAPS_LINE_MAX_LENGTH]; // int c; -- cgit 1.4.1 From 119d7d0025ad3234007c7fbed08b6b33b892e9a5 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Fri, 13 Nov 2020 09:02:44 +0100 Subject: fix frida example debug output --- examples/afl_frida/afl-frida.c | 5 +++-- qemu_mode/libcompcov/pmparser.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'qemu_mode/libcompcov/pmparser.h') diff --git a/examples/afl_frida/afl-frida.c b/examples/afl_frida/afl-frida.c index 79d823f1..31bf8f25 100644 --- a/examples/afl_frida/afl-frida.c +++ b/examples/afl_frida/afl-frida.c @@ -504,11 +504,12 @@ int main() { previous_pc = 0; // Required! #ifdef _DEBUG - fprintf(stderr, "CLIENT crc: %016llx len: %u\n", hash64(__afl_fuzz_ptr, *__a + fprintf(stderr, "CLIENT crc: %016llx len: %u\n", + hash64(__afl_fuzz_ptr, *__afl_fuzz_len), *__afl_fuzz_len); fprintf(stderr, "RECV:"); for (int i = 0; i < *__afl_fuzz_len; i++) fprintf(stderr, "%02x", __afl_fuzz_ptr[i]); - fprintf(stderr,"\n"); + fprintf(stderr, "\n"); #endif // STEP 3: ensure the minimum length is present and setup the target diff --git a/qemu_mode/libcompcov/pmparser.h b/qemu_mode/libcompcov/pmparser.h index 1a3d8834..0eb4fb1d 100644 --- a/qemu_mode/libcompcov/pmparser.h +++ b/qemu_mode/libcompcov/pmparser.h @@ -108,7 +108,7 @@ void pmparser_print(procmaps_struct *map, int order); procmaps_iterator *pmparser_parse(int pid) { - char maps_path[500]; + char maps_path[500]; if (pid >= 0) { sprintf(maps_path, "/proc/%d/maps", pid); @@ -129,8 +129,8 @@ procmaps_iterator *pmparser_parse(int pid) { } procmaps_iterator *maps_it = malloc(sizeof(procmaps_iterator)); - int ind = 0; - char buf[PROCMAPS_LINE_MAX_LENGTH]; + int ind = 0; + char buf[PROCMAPS_LINE_MAX_LENGTH]; // int c; procmaps_struct *list_maps = NULL; procmaps_struct *tmp; -- cgit 1.4.1