[FFmpeg-cvslog] avcodec/hevcdec: Avoid null pointer dereferences in MC
Michael Niedermayer
git at videolan.org
Thu Oct 19 14:31:38 EEST 2023
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Thu May 25 23:40:18 2023 +0200| [3b811d871e712385667a8e3ae0227d9bb9a0035a] | committer: Michael Niedermayer
avcodec/hevcdec: Avoid null pointer dereferences in MC
Fixes: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffff8
Fixes: 58440/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5956015530311680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit a0f4d4e65093a4cb627f05d09b19c922e88cfac1)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b811d871e712385667a8e3ae0227d9bb9a0035a
---
libavcodec/hevc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 49f52f8180..d1a99013be 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1749,13 +1749,13 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
if (current_mv.pred_flag & PF_L0) {
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
- if (!ref0)
+ if (!ref0 || !ref0->frame->data[0])
return;
hevc_await_progress(s, ref0, ¤t_mv.mv[0], y0, nPbH);
}
if (current_mv.pred_flag & PF_L1) {
ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
- if (!ref1)
+ if (!ref1 || !ref1->frame->data[0])
return;
hevc_await_progress(s, ref1, ¤t_mv.mv[1], y0, nPbH);
}
More information about the ffmpeg-cvslog
mailing list