mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 13:30:45 +00:00
avcodec/wavpack: Fix invalid shift
Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 2377/clusterfuzz-testcase-minimized-6108505935183872 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:
parent
7592d97f10
commit
c07af72098
@ -846,9 +846,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
|
||||
continue;
|
||||
}
|
||||
bytestream2_get_buffer(&gb, val, 4);
|
||||
if (val[0] > 31) {
|
||||
if (val[0] > 30) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid INT32INFO, extra_bits = %d (> 32)\n", val[0]);
|
||||
"Invalid INT32INFO, extra_bits = %d (> 30)\n", val[0]);
|
||||
continue;
|
||||
} else if (val[0]) {
|
||||
s->extra_bits = val[0];
|
||||
|
Loading…
Reference in New Issue
Block a user