diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-08 01:19:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-08 01:20:55 +0200 |
commit | 56abad0ee4a34789f8bc00ba236c7f6be982ce26 (patch) | |
tree | 09909947d3eeab45f2b772d5f707dec22eca1500 /libavcodec/smvjpegdec.c | |
parent | 5b9917ec2b1372015390ee4fe82b56a55f463d55 (diff) | |
download | ffmpeg-56abad0ee4a34789f8bc00ba236c7f6be982ce26.tar.gz |
avcodec/smvjpegdec: copy palette too
Fixes out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/smvjpegdec.c')
-rw-r--r-- | libavcodec/smvjpegdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index 4897575746..2086a2894b 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -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) |