avcodec/lcldec: initialize encoded correctly

Fixes out of array read
Fixes: yuv111_no_compr_crash.avi

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-14 15:18:49 +02:00
parent 117bc8e6ff
commit 6c36b3afe7
1 changed files with 1 additions and 1 deletions

View File

@ -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