diff --git a/libavcodec/tta.c b/libavcodec/tta.c index c0162c5849..118b9f79ec 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -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; }