summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-30 22:45:40 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-31 12:28:58 +0200
commit55d53cb59380bebea79ae8f99d4e119b2b006629 (patch)
tree80db08694fbb13831846a408a9d3140ccf59de5a /libavfilter
parent5036e214b0e1028e035d628f7e7f89cb1ba6a0d6 (diff)
downloadffmpeg-streaming-55d53cb59380bebea79ae8f99d4e119b2b006629.zip
ffmpeg-streaming-55d53cb59380bebea79ae8f99d4e119b2b006629.tar.gz
avfilter/avfiltergraph: Check for allocation failure in avfilter_graph_queue_command()
Fixes: CID1396538 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfiltergraph.c3
1 files changed, 3 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud