ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Thu Aug 25 23:11:02 2022 +0200| [90aa2a88f98473810bbbf6514a8327ae8ea9208a] | 
committer: Andreas Rheinhardt

fftools/ffmpeg_opt: Check creation of new program

Fixes Coverity issue #1512413.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90aa2a88f98473810bbbf6514a8327ae8ea9208a
---

 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) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to