[FFmpeg-cvslog] avcodec/ass_split: check ASSSplitContext alloc

Clément Bœsch git at videolan.org
Sat Jun 13 20:42:21 CEST 2015


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Jun 13 20:39:57 2015 +0200| [324cf0645d6ad20c5f990bd5c945f562ed69ca09] | committer: Clément Bœsch

avcodec/ass_split: check ASSSplitContext alloc

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

 libavcodec/ass_split.c |    2 ++
 1 file changed, 2 insertions(+)

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



More information about the ffmpeg-cvslog mailing list