Commit Graph

10 Commits

Author SHA1 Message Date
Kacper Michajłow 8a5989628c meson: add fuzzers alias for all fuzzer targets
Makes it easier to build only fuzzer binaries and avoid building
unnecessary targets from subprojects.
2024-06-24 17:36:53 +02:00
Kacper Michajłow 8e7d442f08 fuzzers: enable edl, file and lavf protocols
To close already fixes issues on OSS-Fuzz.

Hopefully there is enough space for those. There is no way of checking
that, except that it stops working.
2024-06-18 03:11:14 +02:00
Kacper Michajłow 71d3f4157b fuzzers: disable some targets as we hit out of space errors
To test if this resolves issues with oss-fuzz.
2024-06-16 05:42:34 +02:00
Kacper Michajłow 9b935c9076 fuzzers/meson: set link language to cpp 2024-06-16 01:21:16 +02:00
Kacper Michajłow 7a93a584fc fuzzer: add dedicated fuzzers for each demuxer
This will help drill deeper into specific code.
2024-05-15 20:09:54 +02:00
Kacper Michajłow 3c26389312 fuzzer_load: merge file and config load into one file
Removes code duplication. Add missing unlink while at it.
2024-05-15 20:09:54 +02:00
Kacper Michajłow fd1c13f9b3 fuzzers: don't build binaries for disabled protocols
While there is a merit to test if disabled protocols doesn't crash or
something, such test can be made as simple unit tests, no fuzzing needed.
2024-05-15 20:09:54 +02:00
Kacper Michajłow bf6d49cbd4 fuzzer_loadfile_direct: exclude paths also for file://
Loading external files makes little sense. Might disable this completely
later, but let see how it works, The idea is the same as for direct
load. Exclude paths starting with `file://.` and `file:///`. But still
fuzz any processing that other input might have. It shouldn't be a huge
problem if we do `file://mpv` for example. Not great, but also not
terrible.
2024-05-09 02:01:24 +02:00
Kacper Michajłow e1d1eb7ace fuzzers: add fuzzer for config parsers 2024-05-08 18:52:40 +02:00
Kacper Michajłow 47dbc3a74e fuzzers: add new fuzzer targets
fuzzer_set_property.c:

fuzz mpv_set_property in both initialized and non-initialized state.
Useful for user provided values sanitization test. I've already seen
some memory leaks in parsing code, good to drill it.

fuzzer_loadfile.c:

mpv_command "loadfile" test. Good for testing demuxers, decoding and
playback loop. Sadly in headless mode we can't really test AO and VO,
but at least all the code around can be fuzzed. Especially our custom
demuxers like demux_mkv.

fuzzer_loadfile_direct.c:

Similar to loadfile above, but instead of saving the data to file, it
passes the fuzz input in the command. Generated protocol specific
versions (mf:// and memory:// for now) and generic one.

Nothing really complex, but good start and even those few targets should
give good coverage of the most common code paths in libmpv.
2024-04-27 02:47:47 +02:00