From 49cb039b8c04e788295ec273c83f462fa2f3a786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 8 May 2024 17:16:08 +0200 Subject: [PATCH] fuzzer_set_property: fix for other types than string I tested with string version, oops. --- fuzzers/fuzzer_set_property.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fuzzers/fuzzer_set_property.c b/fuzzers/fuzzer_set_property.c index a11573825d..421c8ac40c 100644 --- a/fuzzers/fuzzer_set_property.c +++ b/fuzzers/fuzzer_set_property.c @@ -68,8 +68,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) check_error(mpv_initialize(ctx)); #endif - const void *value = data; - mpv_set_property(ctx, name, MPV_FORMAT, &value); +if (MPV_FORMAT == MPV_FORMAT_STRING) { + mpv_set_property_string(ctx, name, (void *)data); +} else { + mpv_set_property(ctx, name, MPV_FORMAT, (void *)data); +} #if MPV_RUN check_error(mpv_set_option_string(ctx, "audio-files", "av://lavfi:sine=d=0.1"));