diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-21 16:10:37 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-22 12:17:14 -0700 |
commit | e73c6aaabff1169899184c382385fe9afae5b068 (patch) | |
tree | 9240b2ecd8cba67c84798cc69b40c8888a68b2a0 /libavformat/asfdec.c | |
parent | 262196445cf03fda0f7e41c4b968f4f7bf060e6b (diff) | |
download | ffmpeg-e73c6aaabff1169899184c382385fe9afae5b068.tar.gz |
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.c | 2 |
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 } } |