History

avcodec/vvc_parser: Avoid undefined overflow in POC computation

The comments to the function say that it does not implement the spec and instead follows VTM. This patch is quite likely not the right solution and more intended to show the issue to people knowing the specific part of VTM ... Fixes: signed integer overflow: 2147483392 + 256 cannot be represented in type 'int' Fixes: 60505/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6216675924770816

Michael Niedermayer committed 3 years ago

Commit f1954ff1 parent 9ee87241 file · +2 −2Browse files

Unified · Split

libavcodec/vvc_parser.c+2−2
@@ -225,10 +225,10 @@ static void get_slice_poc(VVCParserContext *s, int *poc, · 224 unmodified lines
225225 } else {
226226 if ((poc_lsb < prev_poc_lsb) && ((prev_poc_lsb - poc_lsb) >=
227227 (max_poc_lsb / 2)))
228− poc_msb = prev_poc_msb + max_poc_lsb;
228+ poc_msb = prev_poc_msb + (unsigned)max_poc_lsb;
229229 else if ((poc_lsb > prev_poc_lsb) && ((poc_lsb - prev_poc_lsb) >
230230 (max_poc_lsb / 2)))
231− poc_msb = prev_poc_msb - max_poc_lsb;
231+ poc_msb = prev_poc_msb - (unsigned)max_poc_lsb;
232232 else
233233 poc_msb = prev_poc_msb;
234234 }

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