mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-08-02 11:41:29 +00: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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user