Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-13 22:12:17 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-09-17 01:06:48 +0300
commitc467adf3bf9bb4b7fd28956ec698d884e63f145d (patch)
tree7b149f970c8a94ac2c5af5b46ec544908161d326 /libavcodec/wmalosslessdec.c
parent161495a3d026a73bc802c66a94e867ef457320d4 (diff)
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>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 2 insertions, 0 deletions
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);