From dd20e7ede5bfdc99c211b80e35d54b6ade028405 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 15 May 2012 02:26:19 +0200 Subject: [PATCH] assdec: check that the alloc+init of the private data succeeded. Fixes a part of Ticket1208 Found-by: John Villamil and Piotr Bandurski Signed-off-by: Michael Niedermayer --- libavcodec/assdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index 47ea3308f4..979af2a221 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -31,6 +31,8 @@ static av_cold int ass_decode_init(AVCodecContext *avctx) memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size); avctx->subtitle_header_size = avctx->extradata_size; avctx->priv_data = ff_ass_split(avctx->extradata); + if(!avctx->priv_data) + return -1; return 0; }