You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/qdm2: Check checksum_size for 0
Fixes: Infinite loop
Fixes: 15337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5757428949319680
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 7b2ebf89a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
			
			
This commit is contained in:
		| @@ -1704,8 +1704,8 @@ 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) { | ||||
|         av_log(avctx, AV_LOG_ERROR, "data block size too large (%u)\n", s->checksum_size); | ||||
|     if (s->checksum_size >= 1U << 28 || !s->checksum_size) { | ||||
|         av_log(avctx, AV_LOG_ERROR, "data block size invalid (%u)\n", s->checksum_size); | ||||
|         return AVERROR_INVALIDDATA; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user