Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Kinsey <gkinsey@ad-holdings.co.uk>2011-09-08 16:01:14 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-09-09 01:48:08 +0400
commite6df35b3be5f722f49390b9950dde78975f33350 (patch)
tree50cae0166c8756b4909b4c20d0f02f0a1b4d0844 /libavformat/utils.c
parentb2c9e9be870d2abcd2f85c9c0e3af5d1be3ac9e5 (diff)
Prevent double free of side_data when AVFMT_FLAG_KEEP_SIDE_DATA flag is set
(cherry picked from commit d64066f6e88c827e33002b2c7740efd62cd5ba7f)
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 52b2ae95bf..a582ddcc61 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1133,7 +1133,10 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
if (!st->need_parsing || !st->parser) {
/* no parsing needed: we just output the packet as is */
/* raw data support */
- *pkt = st->cur_pkt; st->cur_pkt.data= NULL;
+ *pkt = st->cur_pkt;
+ st->cur_pkt.data= NULL;
+ st->cur_pkt.side_data_elems = 0;
+ st->cur_pkt.side_data = NULL;
compute_pkt_fields(s, st, NULL, pkt);
s->cur_st = NULL;
if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&