fuzz: don't buffer stdout in afl stubs
authorWei Liu <wei.liu2@citrix.com>
Tue, 31 Jan 2017 11:07:58 +0000 (11:07 +0000)
committerWei Liu <wei.liu2@citrix.com>
Wed, 1 Feb 2017 11:25:26 +0000 (11:25 +0000)
... to avoid obscuring output.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/fuzz/libelf/afl-libelf-fuzzer.c
tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer.c

index 02cbfb0e2cdd49e8f9f0f9d92c84239edb6c5077..115c98e22e0bdd7830529225850ed693dbde43fd 100644 (file)
@@ -13,6 +13,8 @@ int main(int argc, char **argv)
     size_t size;
     FILE *fp;
 
+    setbuf(stdout, NULL);
+
     if ( argc != 2 )
     {
         printf("Expecting only one argument\n");
index b5668c11e74e2e0688c8dae1b505ff21d9d9eb89..494c23ba2edc6cf8b21a2231b3d53a0746f54966 100644 (file)
@@ -13,6 +13,8 @@ int main(int argc, char **argv)
     size_t size;
     FILE *fp;
 
+    setbuf(stdout, NULL);
+
     if ( argc != 2 )
     {
         printf("Expecting only one argument\n");