Code Review
/
apps
/
low-level-can-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6b63b26
)
Fix bug in fuzzstub.
author
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 1 Oct 2015 14:38:10 +0000
(17:38 +0300)
committer
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 1 Oct 2015 14:38:10 +0000
(17:38 +0300)
The fread call always returned a message length of 1 byte,
making the fuzz stub used for external fuzzers useless. The
normal fuzztest.c was unaffected.
Bug found using afl-fuzz.
tests/fuzztest/fuzzstub.c
patch
|
blob
|
history
diff --git
a/tests/fuzztest/fuzzstub.c
b/tests/fuzztest/fuzzstub.c
index
ce14b9b
..
ec9e2af
100644
(file)
--- a/
tests/fuzztest/fuzzstub.c
+++ b/
tests/fuzztest/fuzzstub.c
@@
-165,7
+165,7
@@
static void run_iteration()
size_t msglen;
bool status;
- msglen = fread(buffer,
BUFSIZE, 1
, stdin);
+ msglen = fread(buffer,
1, BUFSIZE
, stdin);
status = do_static_decode(buffer, msglen, false);