From 4bca1474157f19cbf80a64f055ecd655060f9f1b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 28 Apr 2024 01:15:16 +0200 Subject: [PATCH] fftools/ffplay: Check vulkan_params Fixes: CID1550133 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- fftools/ffplay.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 1d0511b254..fe1e7936cb 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3836,8 +3836,13 @@ int main(int argc, char **argv) if (vk_renderer) { AVDictionary *dict = NULL; - if (vulkan_params) - av_dict_parse_string(&dict, vulkan_params, "=", ":", 0); + if (vulkan_params) { + int ret = av_dict_parse_string(&dict, vulkan_params, "=", ":", 0); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Failed to parse, %s\n", vulkan_params); + do_exit(NULL); + } + } ret = vk_renderer_create(vk_renderer, window, dict); av_dict_free(&dict); if (ret < 0) {