Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/fuzzing/linux_x8664/fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ int fun(int i)
char *buf = malloc(SIZE);
char buf2[SIZE];

while (*buf = getc(stdin) == 'A')
while ((*buf = getc(stdin)) == 'A')
{
buf[i++] = *buf;
}

strncpy(buf2, buf, i);
printf(buf2);
puts(buf2);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/fuzzing/linux_x8664/fuzz_x8664_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def start_afl(ql: Qiling):

# make the process crash whenever __stack_chk_fail@plt is about to be called.
# this way afl will count stack protection violations as crashes
ql.hook_address(callback=lambda x: os.abort(), address=ba + 0x1225)
ql.hook_address(callback=lambda x: os.abort(), address=ba + 0x126e)

# set afl instrumentation [re]starting point. we set it to 'main'
ql.hook_address(callback=start_afl, address=ba + 0x122c)
ql.hook_address(callback=start_afl, address=ba + 0x1275)

# okay, ready to roll
ql.run()
Expand Down
Binary file modified examples/fuzzing/linux_x8664/x8664_fuzz
Binary file not shown.