[FFmpeg-cvslog] truemotion2: Fix the buffer check
Luca Barbato
git at videolan.org
Tue Nov 10 17:59:30 CET 2015
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Nov 1 04:07:47 2015 +0100| [de41b555cdea2dcacbe98ee9edc83a8c15c73c4c] | committer: Luca Barbato
truemotion2: Fix the buffer check
The variable skip contains the expected size in bytes.
Bug-Id: 906
CC: libav-stable at libav.org
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de41b555cdea2dcacbe98ee9edc83a8c15c73c4c
---
libavcodec/truemotion2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 84e8e2a..1726440 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -291,7 +291,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 AVERROR_INVALIDDATA;
}
More information about the ffmpeg-cvslog
mailing list