History

avcodec/vvc/ctu: Check palette_escape_val

Fixes: integer overflow Fixes: 418314174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4871731867353088

Michael Niedermayer committed 1 year ago

Commit 9d1e4fe1 parent 38ead081 file · +2 −0Browse files

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

Unified · Split

libavcodec/vvc/ctu.c+2−0
@@ -2053,6 +2053,8 @@ static int palette_subblock_data(VVCLocalContext *lc, · 2052 unmodified lines
20532053 const int v = PALETTE_INDEX(xc, yc);
20542054 if (v == esc) {
20552055 const int coeff = ff_vvc_palette_escape_val(lc);
2056+ if (coeff >= (1U << sps->bit_depth))
2057+ return AVERROR_INVALIDDATA;
20562058 const int pixel = av_clip_intp2(RSHIFT(coeff * scale, 6), sps->bit_depth);
20572059 PALETTE_SET_PIXEL(xc, yc, pixel);
20582060 } else {

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