提交 a1223ddc 编写于 作者: M Michael Niedermayer

avcodec/huffyuvdec: Test vertical coordinate more often

Fixes: out of array access
Fixes: 22892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5135996772679680.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: NPaul B Mahol <onemda@gmail.com>
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 d9aa1ef2
......@@ -928,12 +928,16 @@ static int decode_slice(AVCodecContext *avctx, AVFrame *p, int height,
left= left_prediction(s, p->data[plane], s->temp[0], w, 0);
y = 1;
if (y >= h)
break;
/* second line is left predicted for interlaced case */
if (s->interlaced) {
decode_plane_bitstream(s, w, plane);
left = left_prediction(s, p->data[plane] + p->linesize[plane], s->temp[0], w, left);
y++;
if (y >= h)
break;
}
lefttop = p->data[plane][0];
......@@ -1045,6 +1049,8 @@ static int decode_slice(AVCodecContext *avctx, AVFrame *p, int height,
}
cy = y = 1;
if (y >= height)
break;
/* second line is left predicted for interlaced case */
if (s->interlaced) {
......@@ -1057,6 +1063,8 @@ static int decode_slice(AVCodecContext *avctx, AVFrame *p, int height,
}
y++;
cy++;
if (y >= height)
break;
}
/* next 4 pixels are left predicted too */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册