aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-11-03 15:54:04 -0700
committerAlex Converse <alex.converse@gmail.com>2011-11-03 15:54:04 -0700
commit0d7a16a9467eab58aca4508a70cb546741664ac0 (patch)
tree9fbffbb1e8f7eca6d9974f5d8a70a2d30a0c2fdc
parentcae4f4b77e7dc037ad5dfcc7bc636788f1420ba9 (diff)
downloadffmpeg-0d7a16a9467eab58aca4508a70cb546741664ac0.tar.gz
avfilter: Don't copy garbage from the stack when setting up video pictures.
-rw-r--r--libavfilter/avfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index abeae14f79..2f24aa3d98 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -332,8 +332,8 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int
picref->type = AVMEDIA_TYPE_VIDEO;
pic->format = picref->format = format;
- memcpy(pic->data, data, sizeof(pic->data));
- memcpy(pic->linesize, linesize, sizeof(pic->linesize));
+ memcpy(pic->data, data, 4*sizeof(data[0]));
+ memcpy(pic->linesize, linesize, 4*sizeof(linesize[0]));
memcpy(picref->data, pic->data, sizeof(picref->data));
memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize));