mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
avcodec/wmalosslessdec: Check remaining space before padding and channel residue
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 <michael@niedermayer.cc>
(cherry picked from commit c467adf3bf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -936,6 +936,8 @@ static int decode_subframe(WmallDecodeCtx *s)
|
|||||||
s->do_lpc = 0;
|
s->do_lpc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (get_bits_left(&s->gb) < 1)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (get_bits1(&s->gb))
|
if (get_bits1(&s->gb))
|
||||||
padding_zeroes = get_bits(&s->gb, 5);
|
padding_zeroes = get_bits(&s->gb, 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user