Re: [FFmpeg-devel] [PATCH 3/3] avcodec/qdm2: Check checksum_size for 0

2019-07-08 Thread Michael Niedermayer
On Mon, Jun 24, 2019 at 01:01:04AM +0200, Michael Niedermayer wrote:
> 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 
> ---
>  libavcodec/qdm2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Whats the most studid thing your enemy could do ? Blow himself up
Whats the most studid thing you could do ? Give up your rights and
freedom because your enemy blew himself up.



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 3/3] avcodec/qdm2: Check checksum_size for 0

2019-06-23 Thread Michael Niedermayer
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 
---
 libavcodec/qdm2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 42e10829e9..05519d61a4 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1703,8 +1703,8 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
 s->group_size = bytestream2_get_be32();
 s->fft_size = bytestream2_get_be32();
 s->checksum_size = bytestream2_get_be32();
-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;
 }
 
-- 
2.22.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".