Browse Source

avcodec/h264_mc_template: Only prefetch motion if the list is used.

Fixes: index 59 out of bounds for type 'H264Ref [48]'
Fixes: 8232/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5703295145345024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8b55591757)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.8
Michael Niedermayer 7 years ago
parent
commit
5f771a74b2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/h264_mc_template.c

+ 2
- 1
libavcodec/h264_mc_template.c View File

@@ -78,7 +78,8 @@ static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl,

if (HAVE_THREADS && (h->avctx->active_thread_type & FF_THREAD_FRAME))
await_references(h, sl);
prefetch_motion(h, sl, 0, PIXEL_SHIFT, CHROMA_IDC);
if (USES_LIST(mb_type, 0))
prefetch_motion(h, sl, 0, PIXEL_SHIFT, CHROMA_IDC);

if (IS_16X16(mb_type)) {
mc_part(h, sl, 0, 1, 16, 0, dest_y, dest_cb, dest_cr, 0, 0,


Loading…
Cancel
Save