[FFmpeg-cvslog] avcodec/tta: Check init_get_bits8() for failure
Michael Niedermayer
git at videolan.org
Sun Dec 6 12:57:09 CET 2015
ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 4 01:18:13 2015 +0200| [ec35bb729cdd36a757f6180fc3c69b76404e773a] | committer: Michael Niedermayer
avcodec/tta: Check init_get_bits8() for failure
Fixes: CID1322319
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit f1593e4ca564cdb7f3194a9eee1dea16df41142d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec35bb729cdd36a757f6180fc3c69b76404e773a
---
libavcodec/tta.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 5fdbac8..1c4316b 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -123,6 +123,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
TTAContext *s = avctx->priv_data;
GetBitContext gb;
int total_frames;
+ int ret;
s->avctx = avctx;
@@ -131,7 +132,10 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
return AVERROR_INVALIDDATA;
s->crc_table = av_crc_get_table(AV_CRC_32_IEEE_LE);
- init_get_bits8(&gb, avctx->extradata, avctx->extradata_size);
+ ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size);
+ if (ret < 0)
+ return ret;
+
if (show_bits_long(&gb, 32) == AV_RL32("TTA1")) {
/* signature */
skip_bits_long(&gb, 32);
More information about the ffmpeg-cvslog
mailing list