]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tta.c
avfilter/vf_maskedmerge: fix bug when copying >8bit plane(s)
[ffmpeg] / libavcodec / tta.c
index c0162c5849eaa89d78be1135e33b9a6a58c1183f..8f097b3bcc7fcbe9d69c4accd43fefc716f340e8 100644 (file)
@@ -285,7 +285,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
         }
 
         if (k) {
-            if (k > MIN_CACHE_BITS) {
+            if (k > MIN_CACHE_BITS || unary > INT32_MAX >> k) {
                 ret = AVERROR_INVALIDDATA;
                 goto error;
             }