[FFmpeg-cvslog] avcodec/lcldec: initialize encoded correctly

Michael Niedermayer git at videolan.org
Thu Aug 14 15:43:33 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Aug 14 15:18:49 2014 +0200| [6c36b3afe72d1ab635efba36e78c849630ed9ec6] | committer: Michael Niedermayer

avcodec/lcldec: initialize encoded correctly

Fixes out of array read
Fixes: yuv111_no_compr_crash.avi

Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/lcldec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index bfab58c..60069d4 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -171,7 +171,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
     LclDecContext * const c = avctx->priv_data;
     unsigned int pixel_ptr;
     int row, col;
-    unsigned char *encoded, *outptr;
+    unsigned char *encoded = avpkt->data, *outptr;
     uint8_t *y_out, *u_out, *v_out;
     unsigned int width = avctx->width; // Real image width
     unsigned int height = avctx->height; // Real image height



More information about the ffmpeg-cvslog mailing list