[FFmpeg-cvslog] assdec: check that the alloc+init of the private data succeeded.
Michael Niedermayer
git at videolan.org
Tue May 15 03:03:11 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 15 02:26:19 2012 +0200| [dd20e7ede5bfdc99c211b80e35d54b6ade028405] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd20e7ede5bfdc99c211b80e35d54b6ade028405
---
libavcodec/assdec.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index 47ea330..979af2a 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;
}
More information about the ffmpeg-cvslog
mailing list