[FFmpeg-devel] [PATCH 12/16] vqa: fix double free on corrupted streams

fenrir at elivagar.org fenrir at elivagar.org
Sat Oct 8 23:40:37 CEST 2011


From: Laurent Aimar <fenrir at videolan.org>

---
 libavformat/westwood.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index 7712865..6b5fd51 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -277,10 +277,8 @@ static int wsvqa_read_header(AVFormatContext *s,
     /* there are 0 or more chunks before the FINF chunk; iterate until
      * FINF has been skipped and the file will be ready to be demuxed */
     do {
-        if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
-            av_free(st->codec->extradata);
+        if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE)
             return AVERROR(EIO);
-        }
         chunk_tag = AV_RB32(&scratch[0]);
         chunk_size = AV_RB32(&scratch[4]);
 
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list