[FFmpeg-cvslog] avcodec/smacker: Check init_get_bits8() for failure

Michael Niedermayer git at videolan.org
Fri Sep 4 03:39:47 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep  4 01:18:13 2015 +0200| [21d8c6612fcec630785af5c0ae087d0393bb2a8e] | committer: Michael Niedermayer

avcodec/smacker: Check init_get_bits8() for failure

Fixes: CID1322314

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21d8c6612fcec630785af5c0ae087d0393bb2a8e
---

 libavcodec/smacker.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 6709f97..b2fc29b 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -316,7 +316,9 @@ static int decode_header_trees(SmackVContext *smk) {
     full_size = AV_RL32(smk->avctx->extradata + 8);
     type_size = AV_RL32(smk->avctx->extradata + 12);
 
-    init_get_bits8(&gb, smk->avctx->extradata + 16, smk->avctx->extradata_size - 16);
+    ret = init_get_bits8(&gb, smk->avctx->extradata + 16, smk->avctx->extradata_size - 16);
+    if (ret < 0)
+        return ret;
 
     if(!get_bits1(&gb)) {
         av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");



More information about the ffmpeg-cvslog mailing list