Skip to content

Commit

Permalink
fuzzer_set_property: fix for other types than string
Browse files Browse the repository at this point in the history
I tested with string version, oops.
  • Loading branch information
kasper93 committed May 8, 2024
1 parent 325abfe commit 49cb039
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fuzzers/fuzzer_set_property.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 49cb039

Please sign in to comment.