diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-08 22:51:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-19 03:40:21 +0200 |
commit | 6405c66a5142a06338b6cf6bfdf8b9c1921bf39b (patch) | |
tree | 7fb65336b785fa341a1eac44cdcc0d5f8b41c0bc | |
parent | a76db7176ab8ff0eaf28f97d79254fe96a4dd520 (diff) | |
download | ffmpeg-6405c66a5142a06338b6cf6bfdf8b9c1921bf39b.tar.gz |
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 fe9242204d33db070b8a9d907d93c9ead8a6f3ee)
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 1af880f4d4..c2263e729a 100644 --- a/libavcodec/ylc.c +++ b/libavcodec/ylc.c @@ -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) & ((1 << FFMAX(pl, 1)) - 1); + bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1); lens[*pos] = FFMAX(pl, 1); xlat[*pos] = s + (pl == 0); (*pos)++; |