From: Justin Ruggles Date: Wed, 21 Sep 2011 18:16:24 +0000 (-0400) Subject: tta: check remaining bitstream size while reading unary value X-Git-Tag: v0.8b1~935 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35f9d8c20a26a7d383d3d36796e64a4b8987d743;p=platform%2Fupstream%2Flibav.git tta: check remaining bitstream size while reading unary value --- diff --git a/libavcodec/tta.c b/libavcodec/tta.c index 5a11436..9330e2d 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -182,7 +182,7 @@ static int tta_get_unary(GetBitContext *gb) int ret = 0; // count ones - while(get_bits1(gb)) + while (get_bits_left(gb) > 0 && get_bits1(gb)) ret++; return ret; }