aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-02-17 04:20:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-13 00:35:15 +0200
commit1a4f8de03d57490b6344ec2eeba3aa816cd1eb62 (patch)
tree9d1de71536d0795724713e61af7a1874114ab95c
parent2a85ead5a374f37bc52d716da9237f4e722dee58 (diff)
downloadffmpeg-1a4f8de03d57490b6344ec2eeba3aa816cd1eb62.tar.gz
avcodec/jpeg2000dec: Use av_image_check_size2()
Fixes: OOM Fixes: 5733/clusterfuzz-testcase-minimized-4906757966004224 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 01370b31aced784593f2bc0836f4ba6fd8e7f6b3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index f1abc9a5ef..404cf06ddc 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -282,7 +282,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
avpriv_request_sample(s->avctx, "Support for image offsets");
return AVERROR_PATCHWELCOME;
}
- if (av_image_check_size(s->width, s->height, 0, s->avctx)) {
+ if (av_image_check_size2(s->width, s->height, s->avctx->max_pixels, AV_PIX_FMT_NONE, 0, s->avctx)) {
avpriv_request_sample(s->avctx, "Large Dimensions");
return AVERROR_PATCHWELCOME;
}