summaryrefslogtreecommitdiff
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-07 12:48:31 -0300
committerJames Almer <jamrial@gmail.com>2017-04-07 12:52:17 -0300
commit7c1566fec39492815eda0dc1fdfd18f8bf7ca635 (patch)
tree8680bf8b76414b0daf621b7d9cf08d8249f3e5da /libavcodec/tta.c
parent08117a40157464f8a9dcc2df393fa5fe299c1e98 (diff)
downloadffmpeg-7c1566fec39492815eda0dc1fdfd18f8bf7ca635.tar.gz
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
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c2
1 files changed, 1 insertions, 1 deletions
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;
}