summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-03-21 16:10:37 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-03-22 12:17:14 -0700
commite73c6aaabff1169899184c382385fe9afae5b068 (patch)
tree9240b2ecd8cba67c84798cc69b40c8888a68b2a0 /libavformat/asfdec.c
parent262196445cf03fda0f7e41c4b968f4f7bf060e6b (diff)
asf: reset side data elements on packet copy.
Prevents crash (double free) when free()ing the original packet. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 07899609c9..d3869b427b 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1072,6 +1072,8 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
//printf("packet %d %d\n", asf_st->pkt.size, asf->packet_frag_size);
asf_st->pkt.size = 0;
asf_st->pkt.data = 0;
+ asf_st->pkt.side_data_elems = 0;
+ asf_st->pkt.side_data = NULL;
break; // packet completed
}
}