mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 03:37:00 +00:00
avcodec/jpeg2000dec: check transform equality in MCT
Fixes null pointer dereference Fixes Ticket2843 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
522f78f8ea
commit
ac3b01a9c0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user