diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2025-07-23 13:36:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2025-07-28 17:41:37 +0200 |
commit | 1b7a327b3a43df6ab82885cea5ae02bf9dd899a9 (patch) | |
tree | a5a2aeaea28df7bdbd7db85e980e0b2e930ef817 | |
parent | c6cb3ab7ff5a66db5d86f270d7c68547dac4da6a (diff) | |
download | ffmpeg-1b7a327b3a43df6ab82885cea5ae02bf9dd899a9.tar.gz |
avformat/vqf: Ensure that comm_chunk is fully read
Fixes: use of uninitialized memory
Fixes: 412125811/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-6253774274887680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/vqf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c index 053720ea22..fb668c16da 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -144,7 +144,9 @@ static int vqf_read_header(AVFormatContext *s) if (len < 12) return AVERROR_INVALIDDATA; - avio_read(s->pb, comm_chunk, 12); + ret = ffio_read_size(s->pb, comm_chunk, 12); + if (ret < 0) + return ret; st->codecpar->ch_layout.nb_channels = AV_RB32(comm_chunk) + 1; read_bitrate = AV_RB32(comm_chunk + 4); rate_flag = AV_RB32(comm_chunk + 8); |