History

avcodec/hevcdec: Check ref frame

Fixes: NULL pointer dereferences Fixes: 68197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6382538823106560

Michael Niedermayer committed 2 years ago

Commit 5eb05f41 parent 4c8a6631 file · +2 −2Browse files

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

Unified · Split

libavcodec/hevcdec.c+2−2
@@ -1969,13 +1969,13 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, · 1968 unmodified lines
1969 1969
1970 if (current_mv.pred_flag & PF_L0) {1970 if (current_mv.pred_flag & PF_L0) {
1971 ref0 = refPicList[0].ref[current_mv.ref_idx[0]];1971 ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
1972 if (!ref0 || !ref0->frame->data[0])1972 if (!ref0 || !ref0->frame)
1973 return;1973 return;
1974 hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);1974 hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);
1975 }1975 }
1976 if (current_mv.pred_flag & PF_L1) {1976 if (current_mv.pred_flag & PF_L1) {
1977 ref1 = refPicList[1].ref[current_mv.ref_idx[1]];1977 ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
1978 if (!ref1 || !ref1->frame->data[0])1978 if (!ref1 || !ref1->frame)
1979 return;1979 return;
1980 hevc_await_progress(s, ref1, &current_mv.mv[1], y0, nPbH);1980 hevc_await_progress(s, ref1, &current_mv.mv[1], y0, nPbH);
1981 }1981 }

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