mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/ylc: Fix vlc of 31 bits
Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 2515/clusterfuzz-testcase-minimized-6197200012967936
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fe9242204d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8d3ac812ff
commit
20d4514f25
@ -69,7 +69,7 @@ static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat,
|
||||
|
||||
s = nodes[node].sym;
|
||||
if (s != -1) {
|
||||
bits[*pos] = (~pfx) & ((1 << FFMAX(pl, 1)) - 1);
|
||||
bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1);
|
||||
lens[*pos] = FFMAX(pl, 1);
|
||||
xlat[*pos] = s + (pl == 0);
|
||||
(*pos)++;
|
||||
|
Loading…
Reference in New Issue
Block a user