Re: [FFmpeg-devel] [PATCH 1/2] avcodec/wmalosslessdec: Check remaining space before padding and channel residue

2020-09-16 Thread Michael Niedermayer
On Mon, Sep 14, 2020 at 12:11:02AM +0200, Michael Niedermayer wrote:
> Fixes: Timeout (1101sec -> 0.4sec)
> Fixes: 
> 24491/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5725337036783616
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/wmalosslessdec.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply patchset

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

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


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 1/2] avcodec/wmalosslessdec: Check remaining space before padding and channel residue

2020-09-13 Thread Michael Niedermayer
Fixes: Timeout (1101sec -> 0.4sec)
Fixes: 
24491/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5725337036783616

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/wmalosslessdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 725e811070..b8d0f6220d 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -932,6 +932,8 @@ static int decode_subframe(WmallDecodeCtx *s)
 s->do_lpc = 0;
 }
 
+if (get_bits_left(&s->gb) < 1)
+return AVERROR_INVALIDDATA;
 
 if (get_bits1(&s->gb))
 padding_zeroes = get_bits(&s->gb, 5);
-- 
2.17.1

___
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".