From be9c9bb55cea9ddac4c47041a5875f824629d03e Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 1 Oct 2015 17:38:10 +0300 Subject: 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. --- tests/fuzztest/fuzzstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit 1.2.3-korg