summaryrefslogtreecommitdiff
path: root/libavcodec/assdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-15 02:26:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-15 02:31:52 +0200
commitdd20e7ede5bfdc99c211b80e35d54b6ade028405 (patch)
treec8ba807ba98c53e647be78d431e25e9acb8cb353 /libavcodec/assdec.c
parent3938a0eeae24a335b181d753c464cf5bab33ff01 (diff)
downloadffmpeg-dd20e7ede5bfdc99c211b80e35d54b6ade028405.tar.gz
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 <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/assdec.c')
-rw-r--r--libavcodec/assdec.c2
1 files changed, 2 insertions, 0 deletions
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;
}