Skip to content
Snippets Groups Projects
Commit 6c36b3af authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/lcldec: initialize encoded correctly


Fixes out of array read
Fixes: yuv111_no_compr_crash.avi

Found-by: default avatarPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 117bc8e6
No related branches found
No related tags found
No related merge requests found
...@@ -171,7 +171,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac ...@@ -171,7 +171,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
LclDecContext * const c = avctx->priv_data; LclDecContext * const c = avctx->priv_data;
unsigned int pixel_ptr; unsigned int pixel_ptr;
int row, col; int row, col;
unsigned char *encoded, *outptr; unsigned char *encoded = avpkt->data, *outptr;
uint8_t *y_out, *u_out, *v_out; uint8_t *y_out, *u_out, *v_out;
unsigned int width = avctx->width; // Real image width unsigned int width = avctx->width; // Real image width
unsigned int height = avctx->height; // Real image height unsigned int height = avctx->height; // Real image height
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment