Commit 7c1566fe authored by James Almer's avatar James Almer

avcodec/tta: Don't try to read more than MIN_CACHE_BITS bits

This fixes assertion failures introduced in 4fbb56ac.

Reviewed-by: michaelni
Reviewed-by: durandal_1707
parent 08117a40
...@@ -285,7 +285,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, ...@@ -285,7 +285,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
} }
if (k) { if (k) {
if (k >= 32 || unary > INT32_MAX >> k) { if (k > MIN_CACHE_BITS || unary > INT32_MAX >> k) {
ret = AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto error; goto error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment