Commit 0d7a16a9 authored by Alex Converse's avatar Alex Converse

avfilter: Don't copy garbage from the stack when setting up video pictures.

parent cae4f4b7
...@@ -332,8 +332,8 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int ...@@ -332,8 +332,8 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int
picref->type = AVMEDIA_TYPE_VIDEO; picref->type = AVMEDIA_TYPE_VIDEO;
pic->format = picref->format = format; pic->format = picref->format = format;
memcpy(pic->data, data, sizeof(pic->data)); memcpy(pic->data, data, 4*sizeof(data[0]));
memcpy(pic->linesize, linesize, sizeof(pic->linesize)); memcpy(pic->linesize, linesize, 4*sizeof(linesize[0]));
memcpy(picref->data, pic->data, sizeof(picref->data)); memcpy(picref->data, pic->data, sizeof(picref->data));
memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize)); memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment