diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-22 02:57:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-24 17:52:42 +0200 |
commit | 03a9e6ff303ad82e75b734edbe4917ca5fd60159 (patch) | |
tree | 44c9f30fc337daff9a9853f3b7a1f850b00af1fc | |
parent | 0764fe1d09833ae4dcf9e427df09378d0d6a3386 (diff) | |
download | ffmpeg-03a9e6ff303ad82e75b734edbe4917ca5fd60159.tar.gz |
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>
-rw-r--r-- | libavcodec/ylc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c index ae46b3b8c2..11333222b9 100644 --- a/libavcodec/ylc.c +++ b/libavcodec/ylc.c @@ -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) & ((1U << FFMAX(pl, 1)) - 1); + bits[*pos] = (~pfx) & ((1ULL << FFMAX(pl, 1)) - 1); lens[*pos] = FFMAX(pl, 1); xlat[*pos] = s + (pl == 0); (*pos)++; |