mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
5036e214b0
commit
55d53cb593
|
@ -1324,6 +1324,9 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const
|
||||||
queue = &(*queue)->next;
|
queue = &(*queue)->next;
|
||||||
next = *queue;
|
next = *queue;
|
||||||
*queue = av_mallocz(sizeof(AVFilterCommand));
|
*queue = av_mallocz(sizeof(AVFilterCommand));
|
||||||
|
if (!*queue)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
(*queue)->command = av_strdup(command);
|
(*queue)->command = av_strdup(command);
|
||||||
(*queue)->arg = av_strdup(arg);
|
(*queue)->arg = av_strdup(arg);
|
||||||
(*queue)->time = ts;
|
(*queue)->time = ts;
|
||||||
|
|
Loading…
Reference in New Issue