From 7c1566fec39492815eda0dc1fdfd18f8bf7ca635 Mon Sep 17 00:00:00 2001 From: James Almer Date: Fri, 7 Apr 2017 12:48:31 -0300 Subject: avcodec/tta: Don't try to read more than MIN_CACHE_BITS bits This fixes assertion failures introduced in 4fbb56acbe. Reviewed-by: michaelni Reviewed-by: durandal_1707 --- libavcodec/tta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/tta.c') diff --git a/libavcodec/tta.c b/libavcodec/tta.c index 118b9f79ec..8f097b3bcc 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 >= 32 || unary > INT32_MAX >> k) { + if (k > MIN_CACHE_BITS || unary > INT32_MAX >> k) { ret = AVERROR_INVALIDDATA; goto error; } -- cgit v1.2.3