Skip to content

Commit 3c0dc0b

Browse files
authored
Merge pull request #1121 from chinggg/fix-example-fuzz-x8664
fix(example): mistakes in fuzz_x8664_linux binary
2 parents 63fc062 + 26fe48d commit 3c0dc0b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/fuzzing/linux_x8664/fuzz.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ int fun(int i)
1010
char *buf = malloc(SIZE);
1111
char buf2[SIZE];
1212

13-
while (*buf = getc(stdin) == 'A')
13+
while ((*buf = getc(stdin)) == 'A')
1414
{
1515
buf[i++] = *buf;
1616
}
1717

1818
strncpy(buf2, buf, i);
19-
printf(buf2);
19+
puts(buf2);
2020

2121
return 0;
2222
}

examples/fuzzing/linux_x8664/fuzz_x8664_linux.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ def start_afl(ql: Qiling):
6161

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

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

6969
# okay, ready to roll
7070
ql.run()
176 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)