diff options
author | James Almer <jamrial@gmail.com> | 2017-04-07 12:48:31 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-04-07 12:52:17 -0300 |
commit | 7c1566fec39492815eda0dc1fdfd18f8bf7ca635 (patch) | |
tree | 8680bf8b76414b0daf621b7d9cf08d8249f3e5da | |
parent | 08117a40157464f8a9dcc2df393fa5fe299c1e98 (diff) | |
download | ffmpeg-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
-rw-r--r-- | libavcodec/tta.c | 2 |
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; } |