assdec: check that the alloc+init of the private data succeeded.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 15 May 2012 00:26:19 +0000 (02:26 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 May 2012 00:31:52 +0000 (02:31 +0200)
Fixes a part of Ticket1208

Found-by: John Villamil and Piotr Bandurski
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/assdec.c

index 47ea330..979af2a 100644 (file)
@@ -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;
 }