You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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@niedermayer.cc>
This commit is contained in:
@@ -267,7 +267,7 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons
|
|||||||
\
|
\
|
||||||
if (q > switch_bits) { /* exp golomb */ \
|
if (q > switch_bits) { /* exp golomb */ \
|
||||||
bits = exp_order - switch_bits + (q<<1); \
|
bits = exp_order - switch_bits + (q<<1); \
|
||||||
if (bits > MIN_CACHE_BITS) \
|
if (bits > FFMIN(MIN_CACHE_BITS, 31)) \
|
||||||
return AVERROR_INVALIDDATA; \
|
return AVERROR_INVALIDDATA; \
|
||||||
val = SHOW_UBITS(re, gb, bits) - (1 << exp_order) + \
|
val = SHOW_UBITS(re, gb, bits) - (1 << exp_order) + \
|
||||||
((switch_bits + 1) << rice_order); \
|
((switch_bits + 1) << rice_order); \
|
||||||
|
Reference in New Issue
Block a user