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

Michael Niedermayer git at videolan.org
Fri Sep 4 12:05:02 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep  4 11:53:38 2015 +0200| [c447ab0e746c6b4d8d703a55190ae7444199e502] | committer: Michael Niedermayer

avcodec/eatgq: Check init_get_bits8() for failure

Fixes CID1322315

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

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

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

diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index d86cc7b..f8a47cb 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -157,7 +157,10 @@ static int tgq_decode_mb(TgqContext *s, AVFrame *frame, int mb_y, int mb_x)
     mode = bytestream2_get_byte(&s->gb);
     if (mode > 12) {
         GetBitContext gb;
-        init_get_bits8(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode));
+        int ret = init_get_bits8(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode));
+        if (ret < 0)
+            return ret;
+
         for (i = 0; i < 6; i++)
             tgq_decode_block(s, s->block[i], &gb);
         tgq_idct_put_mb(s, s->block, frame, mb_x, mb_y);



More information about the ffmpeg-cvslog mailing list