From dba3595c0ae26795a78753ea33ff0c3edf9d6328 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Mon, 9 Mar 2020 11:24:10 +0100 Subject: AFL without globals (#220) * moved globals to afl, shm and fsrv * moved argv to afl state, less bugs * fixed unicorn docu * lists everywhere * merged custom mutators * fixed leaks in afl-fuzz --- unicorn_mode/samples/c/harness.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unicorn_mode/samples/c') diff --git a/unicorn_mode/samples/c/harness.c b/unicorn_mode/samples/c/harness.c index eb226f9a..18c59c3f 100644 --- a/unicorn_mode/samples/c/harness.c +++ b/unicorn_mode/samples/c/harness.c @@ -209,10 +209,10 @@ int main(int argc, char **argv, char **envp) { // reserve some space for our input data mem_map_checked(uc, INPUT_LOCATION, INPUT_SIZE_MAX, UC_PROT_READ); - // build a "dummy" argv with lenth 2 at 0x10000: + // build a "dummy" argv with length 2 at 0x10000: // 0x10000 argv[0] NULL // 0x10008 argv[1] (char *)0x10016 --. points to the next offset. - // 0x10016 argv[1][0], ... <-^ contains the acutal input data. (INPUT_LOCATION + INPUT_OFFSET) + // 0x10016 argv[1][0], ... <-^ contains the actual input data. (INPUT_LOCATION + INPUT_OFFSET) uc_mem_write(uc, 0x10008, "\x16\x00\x01", 3); // little endian of 0x10016, see above -- cgit 1.4.1