[FFmpeg-cvslog] avfilter/avfiltergraph: Check for allocation failure in avfilter_graph_queue_command()

Michael Niedermayer git at videolan.org
Fri Mar 31 13:29:38 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 30 22:45:40 2017 +0200| [55d53cb59380bebea79ae8f99d4e119b2b006629] | committer: Michael Niedermayer

avfilter/avfiltergraph: Check for allocation failure in avfilter_graph_queue_command()

Fixes: CID1396538

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavfilter/avfiltergraph.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 75bd516..f7fbf11 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -1324,6 +1324,9 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const
                 queue = &(*queue)->next;
             next = *queue;
             *queue = av_mallocz(sizeof(AVFilterCommand));
+            if (!*queue)
+                return AVERROR(ENOMEM);
+
             (*queue)->command = av_strdup(command);
             (*queue)->arg     = av_strdup(arg);
             (*queue)->time    = ts;



More information about the ffmpeg-cvslog mailing list