Browse Source

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
(cherry picked from commit e73c6aaabf)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
tags/n0.10.3
Ronald S. Bultje Reinhard Tartler 14 years ago
parent
commit
19d3f7d8ac
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/asfdec.c

+ 2
- 0
libavformat/asfdec.c View File

@@ -1092,6 +1092,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
}
}


Loading…
Cancel
Save