History

avcodec/hevc/hevcdec: avoid signed shifts with lt_idx_sps

Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 70122/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5172200613675008

Michael Niedermayer committed 2 years ago

Commit d52faba1 parent 419eee61 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/hevc/hevcdec.c+1−1
@@ -292,7 +292,7 @@ static int decode_lt_rps(const HEVCSPS *sps, LongTermRPS *rps, · 291 unmodified lines
292292 lt_idx_sps = get_bits(gb, av_ceil_log2(sps->num_long_term_ref_pics_sps));
293293
294294 rps->poc[i] = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps];
295− rps->used[i] = !!(sps->used_by_curr_pic_lt & (1 << lt_idx_sps));
295+ rps->used[i] = !!(sps->used_by_curr_pic_lt & (1U << lt_idx_sps));
296296 } else {
297297 rps->poc[i] = get_bits(gb, sps->log2_max_poc_lsb);
298298 rps->used[i] = get_bits1(gb);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t