[FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_opt: Check creation of new program
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sat Aug 27 16:58:47 EEST 2022
Fixes Coverity issue #1512413.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
fftools/ffmpeg_opt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index b0b8ecc868..74427cf80d 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -2753,6 +2753,8 @@ static void of_add_programs(AVFormatContext *oc, const OptionsContext *o)
}
program = av_new_program(oc, progid);
+ if (!program)
+ report_error_then_exit_program(AVERROR(ENOMEM));
p = o->program[i].u.str;
while(*p) {
--
2.34.1
More information about the ffmpeg-devel
mailing list