mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
tm2dec: fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f9143d2407
commit
3768445be8
@ -272,7 +272,7 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
|
||||
if(len == 0)
|
||||
return 4;
|
||||
|
||||
if (len >= INT_MAX/4-1 || len < 0 || len > buf_size) {
|
||||
if (len >= INT_MAX/4-1 || len < 0 || skip > buf_size) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "Error, invalid stream size.\n");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user