fuzz: always call fuzz_setup_logging()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Nov 2023 17:09:04 +0000 (02:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Nov 2023 18:04:27 +0000 (03:04 +0900)
src/boot/efi/fuzz-bcd.c
src/boot/efi/fuzz-efi-osrel.c
src/boot/efi/fuzz-efi-printf.c
src/boot/efi/fuzz-efi-string.c
src/udev/fuzz-udev-rule-parse-value.c

index 297b71f..cb5be7a 100644 (file)
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         if (outside_size_range(size, 0, 100*1024))
                 return 0;
 
+        fuzz_setup_logging();
+
         p = memdup(data, size);
         assert_se(p);
 
index 900e65b..1a5a9bc 100644 (file)
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         if (data[SEP_LEN] != '\0')
                 return 0;
 
+        fuzz_setup_logging();
+
         _cleanup_free_ char *p = memdup_suffix0(data + SEP_LEN + 1, size - SEP_LEN - 1);
         assert_se(p);
 
index 218a427..6dee830 100644 (file)
@@ -42,6 +42,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         const Input *i = (const Input *) data;
         size_t len = size - offsetof(Input, str);
 
+        fuzz_setup_logging();
+
         PRINTF_ONE(i->status, "%*.*s", i->field_width, (int) len, i->str);
         PRINTF_ONE(i->status, "%*.*ls", i->field_width, (int) (len / sizeof(wchar_t)), (const wchar_t *) i->str);
 
index 3c0f0f3..36ecaf9 100644 (file)
@@ -16,6 +16,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         if (outside_size_range(size, sizeof(size_t), 64 * 1024))
                 return 0;
 
+        fuzz_setup_logging();
+
         size_t len, len2;
         memcpy(&len, data, sizeof(len));
         data += sizeof(len);
index c7b8504..1817c15 100644 (file)
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         char *value = UINT_TO_PTR(0x12345678U);
         char *endpos = UINT_TO_PTR(0x87654321U);
 
+        fuzz_setup_logging();
+
         assert_se(str = malloc(size + 1));
         memcpy(str, data, size);
         str[size] = '\0';