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 | 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 | 36 | // fmemopen doesn't have associated file descriptor, so we do copy. |
| 32 | 37 | int fd = memfd_create("fuzz_mpv_load", 0); |
| 33 | 38 | if (fd == -1) |