mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/alsdec: Fix undefined behavior in decode_rice()
Fixes: left shift of 72 by 26 places cannot be represented in type 'int'
Fixes: 15279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5700665621348352
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 51f6870c37
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1157ba81cf
commit
268dfc0dd5
@ -487,7 +487,7 @@ static void parse_bs_info(const uint32_t bs_info, unsigned int n,
|
||||
static int32_t decode_rice(GetBitContext *gb, unsigned int k)
|
||||
{
|
||||
int max = get_bits_left(gb) - k;
|
||||
int q = get_unary(gb, 0, max);
|
||||
unsigned q = get_unary(gb, 0, max);
|
||||
int r = k ? get_bits1(gb) : !(q & 1);
|
||||
|
||||
if (k > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user