diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-08 23:40:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-04 01:00:58 +0100 |
commit | b832e539c0dceb2108c8b7f824d9eff9d751853a (patch) | |
tree | d14be0a90ec8f332a888b8ac6f4a48fc872e66bd | |
parent | 2fdbc1d5533ce596bc7e4872dd801c5cdda58aeb (diff) | |
download | ffmpeg-b832e539c0dceb2108c8b7f824d9eff9d751853a.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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c index 818fe2d8d3..dd6ddef905 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]); |