fix(example): mistakes in fuzz_x8664_linux binary #1121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing
IMO,
fuzz.c
intended to read fromstdin
to buf and copy it to buf2, then print buf2 as string.But there are two mistakes which do not affect the fuzzing result, I think they are typos:
*buf = getc(stdin) == 'A'
does not reads char, but the result of comparisonprintf(buf2)
does not print buf2 as stringSo I fix
fuzz.c
then compile it withgcc -g
on Ubuntu 20.04 + gcc9.3, and modify the according address ofmain
andstack_chk
infuzz_x8664_linux.py
, it works as before.If you think the fix is correct, the
arm_qnx
example may need fix as well.