mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-26 13:00:33 +00:00
vqa: fix double free on corrupted streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b226af3910
commit
e3123856c7
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user