From 90aa2a88f98473810bbbf6514a8327ae8ea9208a Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 25 Aug 2022 23:11:02 +0200 Subject: [PATCH] fftools/ffmpeg_opt: Check creation of new program Fixes Coverity issue #1512413. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index c8d3ec3ea6..5febe319e4 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2759,6 +2759,8 @@ static void of_add_programs(AVFormatContext *oc, const OptionsContext *o) } program = av_new_program(oc, progid); + if (!program) + report_and_exit(AVERROR(ENOMEM)); p = o->program[i].u.str; while(*p) {