aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-08 23:40:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-09 03:08:03 +0200
commite3123856c79c36507772ada1bcda6cfe36a1e297 (patch)
treea289208937b7852b994bea1b9765b7f60e86f2b7
parentb226af39107f09cd650875388250f4968eea54db (diff)
downloadffmpeg-e3123856c79c36507772ada1bcda6cfe36a1e297.tar.gz
vqa: fix double free on corrupted streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/westwood.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index 7712865e36..6b5fd51141 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]);