0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

fuzzers: set network-timeout to 1 second

We don't expect any data to actually access, so timeout as soon as
possible.
This commit is contained in:
Kacper Michajłow 2024-05-10 03:41:21 +02:00
parent aa3cf6d57b
commit c1d5f0e9c8
4 changed files with 6 additions and 1 deletions

View File

@ -53,6 +53,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
check_error(mpv_set_option_string(ctx, "network-timeout", "1"));
check_error(mpv_initialize(ctx));

View File

@ -53,6 +53,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
check_error(mpv_set_option_string(ctx, "network-timeout", "1"));
check_error(mpv_initialize(ctx));

View File

@ -68,6 +68,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
check_error(mpv_set_option_string(ctx, "network-timeout", "1"));
check_error(mpv_initialize(ctx));

View File

@ -57,13 +57,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (!ctx)
exit(1);
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
check_error(mpv_set_option_string(ctx, "network-timeout", "1"));
#if MPV_RUN
check_error(mpv_set_option_string(ctx, "vo", "null"));
check_error(mpv_set_option_string(ctx, "ao", "null"));
check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
check_error(mpv_initialize(ctx));
#endif