[FFmpeg-cvslog] avcodec/smvjpegdec: copy palette too

Michael Niedermayer git at videolan.org
Sat Jun 8 02:22:59 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun  8 01:19:27 2013 +0200| [56abad0ee4a34789f8bc00ba236c7f6be982ce26] | committer: Michael Niedermayer

avcodec/smvjpegdec: copy palette too

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56abad0ee4a34789f8bc00ba236c7f6be982ce26
---

 libavcodec/smvjpegdec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c
index 4897575..2086a28 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)



More information about the ffmpeg-cvslog mailing list