Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-26 22:54:36 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-02 16:18:20 +0300
commitee69f64bdc9861cf37cd69609ea7c319b844bf87 (patch)
tree7f716e3c81139bd61a2e5e7a67b08cd8ecc84657 /libavcodec
parent57e18185bf23d3b05374681bb1f3168e320ad66f (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> (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 68d5befa40..0c0f41b9b9 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1734,7 +1734,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;
}