Commit 56abad0e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/smvjpegdec: copy palette too

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5b9917ec
......@@ -70,6 +70,9 @@ static inline void smv_img_pnt(uint8_t *dst_data[4], uint8_t *src_data[4],
smv_img_pnt_plane(&dst_data[i], src_data[i],
src_linesizes[i], h, nlines);
}
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
dst_data[1] = src_data[1];
}
static av_cold int smvjpeg_decode_init(AVCodecContext *avctx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment