Fixes: 390565846/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4990028521996288 Fixes: Null pointer dereference
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -186,7 +186,7 @@ static void set_pict_type(AVFrame *frame, const VVCContext *s, const VVCFrameCon · 185 unmodified lines | |||
| 186 | const CodedBitstreamFragment *current = &s->current_frame; | 186 | const CodedBitstreamFragment *current = &s->current_frame; |
| 187 | for (int i = 0; i < current->nb_units && !has_b; i++) { | 187 | for (int i = 0; i < current->nb_units && !has_b; i++) { |
| 188 | const CodedBitstreamUnit *unit = current->units + i; | 188 | 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) { |
| 190 | const H266RawSliceHeader *rsh = unit->content_ref; | 190 | const H266RawSliceHeader *rsh = unit->content_ref; |
| 191 | has_inter |= !IS_I(rsh); | 191 | has_inter |= !IS_I(rsh); |
| 192 | has_b |= IS_B(rsh); | 192 | has_b |= IS_B(rsh); |