mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
08117a4015
commit
7c1566fec3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue