aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2015-10-01 17:38:10 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2015-10-01 17:38:10 +0300
commitbe9c9bb55cea9ddac4c47041a5875f824629d03e (patch)
treea2806787703758cb1f3b98b402739cde21c7f83d
parent6b63b26404064272394740f6b7354e75c5805cec (diff)
Fix bug in fuzzstub.
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.
-rw-r--r--tests/fuzztest/fuzzstub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fuzztest/fuzzstub.c b/tests/fuzztest/fuzzstub.c
index ce14b9ba..ec9e2afe 100644
--- 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);