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:
parent
08117a4015
commit
7c1566fec3
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user