mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-10 09:09:50 +00:00
avcodec/qdm2: The smallest header seems to have 2 bytes so treat 1 as invalid
Fixes: Timeout (217sec -> 2ms)
Fixes: 18488/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5708293662310400
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 e36ccb5048
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1c531e7d76
commit
3c53cdb1ad
@ -1704,7 +1704,7 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
|
||||
s->group_size = bytestream2_get_be32(&gb);
|
||||
s->fft_size = bytestream2_get_be32(&gb);
|
||||
s->checksum_size = bytestream2_get_be32(&gb);
|
||||
if (s->checksum_size >= 1U << 28 || !s->checksum_size) {
|
||||
if (s->checksum_size >= 1U << 28 || s->checksum_size <= 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "data block size invalid (%u)\n", s->checksum_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user