This fuzzer was an early proof of concept as can be seen by the
useless initialized variable and its name is misleading:
It only tests the hexstr feature.

Unlike other tests, it also spams stdout. Let's just drop it for now and
perhaps bring it back in future in a more complete form.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 images/Makefile.sandbox |  1 -
 lib/vsprintf.c          | 15 ---------------
 2 files changed, 16 deletions(-)

diff --git a/images/Makefile.sandbox b/images/Makefile.sandbox
index d13ffb0124b1..5f94b6e589e8 100644
--- a/images/Makefile.sandbox
+++ b/images/Makefile.sandbox
@@ -9,7 +9,6 @@ fuzzer-$(CONFIG_FITIMAGE)       += fit
 fuzzer-$(CONFIG_OFTREE)                += dtb
 fuzzer-$(CONFIG_OFTREE)                += fdt-compatible
 fuzzer-$(CONFIG_PARTITION)     += partitions
-fuzzer-$(CONFIG_PRINTF_HEXSTR) += printf
 
 ifeq ($(CONFIG_SANDBOX),y)
 
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 66b2f4641874..409a8f02dec9 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -22,7 +22,6 @@
 #include <wchar.h>
 #include <of.h>
 #include <efi.h>
-#include <fuzz.h>
 
 #include <common.h>
 #include <pbl.h>
@@ -1006,17 +1005,3 @@ int asprintf(char **strp, const char *fmt, ...)
        return len;
 }
 EXPORT_SYMBOL(asprintf);
-
-static int __maybe_unused fuzz_printf(const uint8_t *data, size_t size)
-{
-       static bool initialized = false;
-
-       if (!initialized) {
-               printf("initializing\n");
-               initialized = true;
-       }
-
-       printf("%*ph\n", (int)size, data);
-       return 0;
-}
-fuzz_test("printf", fuzz_printf);
-- 
2.47.2


Reply via email to