mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
fix(example): mistake in fuzz_x8664_linux binary
- Using the result of an assignment as a condition without parentheses - Replace printf with puts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@ def main(input_file: str):
|
||||
|
||||
# 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()
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user