summaryrefslogtreecommitdiff
path: root/libavformat/yop.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-28 23:59:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-29 02:11:34 +0100
commit551f683861bbae1002542e70dc196244a1cd24ad (patch)
tree9e13befc907d0d31c950f267f2eb6c49f97bdae3 /libavformat/yop.c
parent6ae03353de664d670b32c33726f81758646f99e6 (diff)
downloadffmpeg-551f683861bbae1002542e70dc196244a1cd24ad.tar.gz
yop: Do not keep a copy of parts of the returned packet
Fixes double free Regression since the new buffer references, thus no FFmpeg releases should be affected Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/yop.c')
-rw-r--r--libavformat/yop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/yop.c b/libavformat/yop.c
index d1c01290d6..c84deea58e 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -135,8 +135,7 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
if (yop->video_packet.data) {
*pkt = yop->video_packet;
- yop->video_packet.data = NULL;
- yop->video_packet.size = 0;
+ memset(&yop->video_packet, 0, sizeof(yop->video_packet));
pkt->data[0] = yop->odd_frame;
pkt->flags |= AV_PKT_FLAG_KEY;
yop->odd_frame ^= 1;