[FFmpeg-cvslog] avcodec/exr: Fix overflow with many blocks
Michael Niedermayer
git at videolan.org
Fri Oct 16 00:42:49 EEST 2020
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 26 21:58:37 2020 +0200| [7265b7d904f86ec1c681222310c739f92ba55e5e] | committer: Michael Niedermayer
avcodec/exr: Fix overflow with many blocks
Fixes: signed integer overflow: 1073741827 * 8 cannot be represented in type 'int'
Fixes: 25621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6304841641754624
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7265b7d904f86ec1c681222310c739f92ba55e5e
---
libavcodec/exr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 162b3bb252..80117deb8a 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1789,7 +1789,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
return ret;
- if (bytestream2_get_bytes_left(&s->gb) < nb_blocks * 8)
+ if (bytestream2_get_bytes_left(&s->gb)/8 < nb_blocks)
return AVERROR_INVALIDDATA;
// check offset table and recreate it if need
More information about the ffmpeg-cvslog
mailing list