It produces undeterministic results, especially if it do `include=fd://N` which starts loading external data.
Unified · Split
| @@ -28,6 +28,11 @@ · 27 unmodified lines | |||
| 28 | 28 | ||
| 29 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) | 29 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) |
| 30 | { | 30 | { |
| 31 | #if defined(MPV_LOAD_CONFIG_FILE) || defined(MPV_LOAD_INPUT_CONF) | ||
| 32 | if (memmem(data, size, "include", sizeof("include") - 1)) | ||
| 33 | return 0; | ||
| 34 | #endif | ||
| 35 | |||
| 31 | // fmemopen doesn't have associated file descriptor, so we do copy. | 36 | // fmemopen doesn't have associated file descriptor, so we do copy. |
| 32 | int fd = memfd_create("fuzz_mpv_load", 0); | 37 | int fd = memfd_create("fuzz_mpv_load", 0); |
| 33 | if (fd == -1) | 38 | if (fd == -1) |