OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c9e12b
)
avcodec/pixlet: Fix reading invalid numbers of bits
author
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 18 May 2017 14:51:08 +0000
(16:51 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 18 May 2017 16:08:23 +0000
(18:08 +0200)
Fixes: asertion failure
Fixes: 1664/clusterfuzz-testcase-minimized-
6587801187385344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pixlet.c
patch
|
blob
|
history
diff --git
a/libavcodec/pixlet.c
b/libavcodec/pixlet.c
index
0526264
..
0dfd5ed
100644
(file)
--- a/
libavcodec/pixlet.c
+++ b/
libavcodec/pixlet.c
@@
-229,6
+229,8
@@
static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i
cnt1 = get_bits(b, nbits);
} else {
pfx = 14 + ((((uint64_t)(value - 14)) >> 32) & (value - 14));
+ if (pfx < 1 || pfx > 25)
+ return AVERROR_INVALIDDATA;
cnt1 *= (1 << pfx) - 1;
shbits = show_bits(b, pfx);
if (shbits <= 1) {