summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-26 21:54:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-10-11 16:42:49 +0200
commit6949df35d0c69ae91bb0f49069e0703deb9bd676 (patch)
tree2b7f6b4f10000b361fb893448be1c322b3fb0d6d
parent991246657b436d54d8f72c57fcc4888b835bb7c9 (diff)
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>
-rw-r--r--libavcodec/exr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 216d216785..c80e8eb5e0 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1751,7 +1751,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
/* Verify the xmin, xmax, ymin and ymax before setting the actual image size.
* It's possible for the data window can larger or outside the display window */
- if (s->xmin > s->xmax || s->ymin > s->ymax) {
+ if (s->xmin > s->xmax || s->ymin > s->ymax ||
+ s->ydelta == 0xFFFFFFFF || s->xdelta == 0xFFFFFFFF) {
av_log(avctx, AV_LOG_ERROR, "Wrong or missing size information.\n");
return AVERROR_INVALIDDATA;
}