History

avcodec/vvc/refs: Check content_ref in set_pict_type()

Fixes: 390565846/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4990028521996288 Fixes: Null pointer dereference

Michael Niedermayer committed 1 year ago

Commit a50d36b1 parent 36985701 file · +1 −1Browse files

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

Unified · Split

libavcodec/vvc/refs.c+1−1
@@ -186,7 +186,7 @@ static void set_pict_type(AVFrame *frame, const VVCContext *s, const VVCFrameCon · 185 unmodified lines
186186 const CodedBitstreamFragment *current = &s->current_frame;
187187 for (int i = 0; i < current->nb_units && !has_b; i++) {
188188 const CodedBitstreamUnit *unit = current->units + i;
189− if (unit->type <= VVC_RSV_IRAP_11) {
189+ if (unit->content_ref && unit->type <= VVC_RSV_IRAP_11) {
190190 const H266RawSliceHeader *rsh = unit->content_ref;
191191 has_inter |= !IS_I(rsh);
192192 has_b |= IS_B(rsh);

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