Merge commit '4adbb44ad154cec05e87de60bb827a13c0fe87df'
authorJames Almer <jamrial@gmail.com>
Fri, 7 Apr 2017 02:45:20 +0000 (23:45 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 7 Apr 2017 02:45:20 +0000 (23:45 -0300)
* commit '4adbb44ad154cec05e87de60bb827a13c0fe87df':
  tta: avoid undefined shifts

Merged-by: James Almer <jamrial@gmail.com>
libavcodec/tta.c

index c0162c5..118b9f7 100644 (file)
@@ -285,7 +285,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;
             }