git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2657d2
)
avcodec/wavpack: Fix invalid shift and integer overflow
author
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 7 Apr 2017 01:38:12 +0000
(
03:38
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 4 May 2017 18:32:11 +0000
(20:32 +0200)
Fixes: 940/clusterfuzz-testcase-
5200378381467648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/wavpack.c
patch
|
blob
|
history
diff --git
a/libavcodec/wavpack.c
b/libavcodec/wavpack.c
index
2bda359
..
bc4402f
100644
(file)
--- a/
libavcodec/wavpack.c
+++ b/
libavcodec/wavpack.c
@@
-157,7
+157,7
@@
static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
} else {
t = get_unary_0_33(gb);
if (t >= 2) {
- if (get_bits_left(gb) < t - 1)
+ if (
t >= 32 ||
get_bits_left(gb) < t - 1)
goto error;
t = get_bits_long(gb, t - 1) | (1 << (t - 1));
} else {