[FFmpeg-cvslog] vqa: fix double free on corrupted streams
Laurent Aimar
git at videolan.org
Fri Nov 4 13:22:17 CET 2011
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sat Oct 8 23:40:37 2011 +0200| [b832e539c0dceb2108c8b7f824d9eff9d751853a] | committer: Michael Niedermayer
vqa: fix double free on corrupted streams
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e3123856c79c36507772ada1bcda6cfe36a1e297)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b832e539c0dceb2108c8b7f824d9eff9d751853a
---
libavformat/westwood.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index 818fe2d..dd6ddef 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]);
More information about the ffmpeg-cvslog
mailing list