[FFmpeg-cvslog] tta: avoid undefined shifts

Anton Khirnov git at videolan.org
Fri Apr 7 06:03:40 EEST 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Nov 23 13:02:53 2016 +0100| [4adbb44ad154cec05e87de60bb827a13c0fe87df] | committer: Diego Biurrun

tta: avoid undefined shifts

Signed-off-by: Diego Biurrun <diego at biurrun.de>

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

 libavcodec/tta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 2ac8255..5532580 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -360,7 +360,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
         }
 
         if (k) {
-            if (k > MIN_CACHE_BITS) {
+            if (k >= 32 || unary > INT32_MAX >> k) {
                 ret = AVERROR_INVALIDDATA;
                 goto error;
             }



More information about the ffmpeg-cvslog mailing list