aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-08 23:40:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 19:49:12 +0100
commit23aaa82b1d30456339c09b3591fe78534839d4d0 (patch)
treefe4545626c01a5f0960e27f3ac2a9a465c19140e
parent58087a4e640eb2e1ae77de873f9c1aa37e9c8bbe (diff)
downloadffmpeg-23aaa82b1d30456339c09b3591fe78534839d4d0.tar.gz
vqa: fix double free on corrupted streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e3123856c79c36507772ada1bcda6cfe36a1e297) 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 d2736accc5..7ca179717c 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -279,10 +279,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 (get_buffer(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
- av_free(st->codec->extradata);
+ if (get_buffer(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE)
return AVERROR(EIO);
- }
chunk_tag = AV_RB32(&scratch[0]);
chunk_size = AV_RB32(&scratch[4]);