diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-19 03:33:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-13 19:23:24 +0200 |
commit | ac3b01a9c0607961f4540fe62040833870f5deb1 (patch) | |
tree | fe890fc1950fc4373c5d07b2f9d0e68690b3b676 | |
parent | 522f78f8eabfc1277b11fad13d40870caf5718ab (diff) | |
download | ffmpeg-ac3b01a9c0607961f4540fe62040833870f5deb1.tar.gz |
avcodec/jpeg2000dec: check transform equality in MCT
Fixes null pointer dereference
Fixes Ticket2843
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/jpeg2000dec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index aae369787f..cbba2d02d8 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1140,6 +1140,12 @@ static void mct_decode(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) int32_t *src[3], i0, i1, i2; float *srcf[3], i0f, i1f, i2f; + for (i = 1; i < 3; i++) + if (tile->codsty[0].transform != tile->codsty[i].transform) { + av_log(s->avctx, AV_LOG_ERROR, "Transforms mismatch, MCT not supported\n"); + return; + } + for (i = 0; i < 3; i++) if (tile->codsty[0].transform == FF_DWT97) srcf[i] = tile->comp[i].f_data; |