X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fass_split.c;h=9bc7b9d5d61c0e905c52422b3b9ff98e30eb6507;hb=4299f085f45cdd8fcb3ecf681d9fef0c4b3fe207;hp=2458cb92256a8aa1a4d65ff2e5b5da4d1acd17f9;hpb=c08a64bb2b12a48ce0e6ef41c0962774f599253e;p=ffmpeg diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 2458cb92256..9bc7b9d5d61 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);