Browse Source

tm2dec: fix overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
3768445be8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/truemotion2.c

+ 1
- 1
libavcodec/truemotion2.c View File

@@ -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…
Cancel
Save