diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-15 22:05:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-15 22:11:05 +0100 |
commit | 0eb7de19736891a9386ab66549f780e904a3b6a7 (patch) | |
tree | 7005b8d9ba682290248544bc9ca590ec25ea6210 /libavcodec/jpeg2000dec.c | |
parent | 65d3359fb366ea265a8468d76a111cb7352f0b55 (diff) | |
download | ffmpeg-0eb7de19736891a9386ab66549f780e904a3b6a7.tar.gz |
avcodec/jpeg2000: Change coord to 32bit to support larger than 32k width or height
Fixes: 03e0abe721b1174856d41a1eb5d6a896/signal_sigabrt_7ffff6ae7cc9_3813_e71bf3541abed3ccba031cd5ba0269a4.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 4604e73c75..8cdc729e0c 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -30,6 +30,7 @@ #include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/imgutils.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avcodec.h" @@ -279,7 +280,7 @@ static int get_siz(Jpeg2000DecoderContext *s) avpriv_request_sample(s->avctx, "Support for image offsets"); return AVERROR_PATCHWELCOME; } - if (s->width > 32768U || s->height > 32768U) { + if (av_image_check_size(s->width, s->height, 0, s->avctx)) { avpriv_request_sample(s->avctx, "Large Dimensions"); return AVERROR_PATCHWELCOME; } |