aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-26 21:54:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-09 13:37:21 +0200
commit8a4aab7f0f3d61bc58c1d547192389ced0295c23 (patch)
tree4ae298ca417dd5f7d21b1e6e9b42874c4ff4138d /libavcodec
parentc275fefad981f5875101d044b1cefa57f87e53e8 (diff)
downloadffmpeg-8a4aab7f0f3d61bc58c1d547192389ced0295c23.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>
Diffstat (limited to 'libavcodec')
-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;
}