diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-18 09:40:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-18 10:03:35 +0200 |
commit | 8ae14bf5ce38469924708ae8f79ec4773b64c9e6 (patch) | |
tree | 393ceeed409e8da95f17995fae9e8c4c065d15f6 /libavcodec/jpeg2000dec.c | |
parent | 4d09d2ef9f0e0ec5b168bdc85a1057abd5ddf126 (diff) | |
parent | 18a245a2aea31b92bc435f2962a71e060d83b5f7 (diff) | |
download | ffmpeg-8ae14bf5ce38469924708ae8f79ec4773b64c9e6.tar.gz |
Merge commit '18a245a2aea31b92bc435f2962a71e060d83b5f7'
* commit '18a245a2aea31b92bc435f2962a71e060d83b5f7':
jpeg2000dec: Add more checks when parsing headers
The check cannot be true in FFmpeg, but does no harm.
I will move it in a subsequent commit so it can detect missing SIZ
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index a456819b2a..baef136fa7 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1394,6 +1394,10 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) av_log(s->avctx, AV_LOG_ERROR, "Missing SOT\n"); return AVERROR_INVALIDDATA; } + if (!s->tile) { + av_log(s->avctx, AV_LOG_ERROR, "Missing SIZ\n"); + return AVERROR_INVALIDDATA; + } tile = s->tile + s->curtileno; tp = tile->tile_part + tile->tp_idx; |