summaryrefslogtreecommitdiffstats
path: root/libavcodec/ass_split.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-06-13 20:39:57 +0200
committerClément Bœsch <u@pkh.me>2015-06-13 20:39:57 +0200
commit324cf0645d6ad20c5f990bd5c945f562ed69ca09 (patch)
treef1ccf295a5254e188f016310faa663470f209477 /libavcodec/ass_split.c
parentc3517c377e1f1bdef822440adfff8c3ad2117660 (diff)
downloadffmpeg-streaming-324cf0645d6ad20c5f990bd5c945f562ed69ca09.zip
ffmpeg-streaming-324cf0645d6ad20c5f990bd5c945f562ed69ca09.tar.gz
avcodec/ass_split: check ASSSplitContext alloc
Diffstat (limited to 'libavcodec/ass_split.c')
-rw-r--r--libavcodec/ass_split.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index 2458cb9..9bc7b9d 100644
--- a/libavcodec/ass_split.c
+++ b/libavcodec/ass_split.c
@@ -356,6 +356,8 @@ static int ass_split(ASSSplitContext *ctx, const char *buf)
ASSSplitContext *ff_ass_split(const char *buf)
{
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
+ if (!ctx)
+ return NULL;
ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx);
OpenPOWER on IntegriCloud