[FFmpeg-cvslog] avcodec/exr: Check for duplicate channel index
Michael Niedermayer
git at videolan.org
Mon Jan 21 13:20:54 EET 2019
ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Dec 25 18:41:58 2018 +0100| [1623f42d993adb9fa2bb9f7c766b6ce55922a8d5] | committer: Michael Niedermayer
avcodec/exr: Check for duplicate channel index
Fixes: Out of memory
Fixes: 11582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5730204559867904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit f9728feaf90eb7493f8872356f54150efafb59cc)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1623f42d993adb9fa2bb9f7c766b6ce55922a8d5
---
libavcodec/exr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 5253cc3f13..13755e1e6e 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1463,6 +1463,11 @@ static int decode_header(EXRContext *s, AVFrame *frame)
}
s->pixel_type = current_pixel_type;
s->channel_offsets[channel_index] = s->current_channel_offset;
+ } else if (channel_index >= 0) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Multiple channels with index %d.\n", channel_index);
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
}
s->channels = av_realloc(s->channels,
More information about the ffmpeg-cvslog
mailing list