aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-26 21:54:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-10 16:04:26 +0200
commit20256685acf3fc737827d8a7dfc6ef78377857ca (patch)
tree41030e562bf393ec16bcd1a1f46d7f157395beff
parent7ec4c95d9428fadf912be149090118fdd5b2db13 (diff)
downloadffmpeg-20256685acf3fc737827d8a7dfc6ef78377857ca.tar.gz
avcodec/exr: Check xdelta, ydelta
Fixes: assertion failure Fixes: 25617/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5648746061496320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6949df35d0c69ae91bb0f49069e0703deb9bd676) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/exr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index ba6e3fdcb6..4b417013f9 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1739,7 +1739,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
s->ymin > s->ymax ||
s->xdelta != s->xmax - s->xmin + 1 ||
s->xmax >= s->w ||
- s->ymax >= s->h) {
+ s->ymax >= s->h ||
+ s->ydelta == 0xFFFFFFFF || s->xdelta == 0xFFFFFFFF
+ ) {
av_log(avctx, AV_LOG_ERROR, "Wrong or missing size information.\n");
return AVERROR_INVALIDDATA;
}