[FFmpeg-cvslog] avcodec/proresdec2: SKIP_BITS() does not work with len=32
Michael Niedermayer
git at videolan.org
Thu Feb 1 01:50:39 EET 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Mon Oct 2 04:18:22 2017 +0200| [df66540dd505db93a740929c2228aac433447b07] | committer: Michael Niedermayer
avcodec/proresdec2: SKIP_BITS() does not work with len=32
Fixes: invalid shift
Fixes: 3482/clusterfuzz-testcase-minimized-5446915875405824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c37138e01a93da2f9dd2cc5d4b77e5a38581d130)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=df66540dd505db93a740929c2228aac433447b07
---
libavcodec/proresdec2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 6ff9e8d022..3b21849466 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -264,7 +264,7 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons
\
if (q > switch_bits) { /* exp golomb */ \
bits = exp_order - switch_bits + (q<<1); \
- if (bits > MIN_CACHE_BITS) \
+ if (bits > FFMIN(MIN_CACHE_BITS, 31)) \
return AVERROR_INVALIDDATA; \
val = SHOW_UBITS(re, gb, bits) - (1 << exp_order) + \
((switch_bits + 1) << rice_order); \
More information about the ffmpeg-cvslog
mailing list