1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
James Almer 2017-04-07 12:48:31 -03:00
parent 08117a4015
commit 7c1566fec3

View File

@ -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;
} }