Browse Source

avcodec/ylc: Fix shift overflow

Fixes: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 2698/clusterfuzz-testcase-minimized-4713541443518464

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 03a9e6ff30)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.7
Michael Niedermayer 8 years ago
parent
commit
00b0d595eb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/ylc.c

+ 1
- 1
libavcodec/ylc.c View File

@@ -68,7 +68,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) & ((1U << FFMAX(pl, 1)) - 1);
bits[*pos] = (~pfx) & ((1ULL << FFMAX(pl, 1)) - 1);
lens[*pos] = FFMAX(pl, 1);
xlat[*pos] = s + (pl == 0);
(*pos)++;


Loading…
Cancel
Save