Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-11-01 22:20:02 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-10 17:04:26 +0300
commit2f16247c99442ec5b96ce5acb98f1f8fb9cb353b (patch)
treec7167d2da59dc2fecab7a023ff03c33290ec2627 /libavformat/vqf.c
parent6718c814aa1dbf6c071e499b59f436948a13fe0c (diff)
avformat/vqf: Check len for COMM chunks
Fixes: Infinite loop Fixes: 26696/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-5648269168082944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a834af133b1fe8f29b4075808710ffd98abcac40) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/vqf.c')
-rw-r--r--libavformat/vqf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 755849bac7..75557756ac 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -132,6 +132,9 @@ static int vqf_read_header(AVFormatContext *s)
switch(chunk_tag){
case MKTAG('C','O','M','M'):
+ if (len < 12)
+ return AVERROR_INVALIDDATA;
+
avio_read(s->pb, comm_chunk, 12);
st->codecpar->channels = AV_RB32(comm_chunk ) + 1;
read_bitrate = AV_RB32(comm_chunk + 4);