提交 9eef9eb3 编写于 作者: A Anton Khirnov

h264: check that execute_decode_slices() is not called too many times

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
上级 bfd26b7c
......@@ -4495,6 +4495,12 @@ static int execute_decode_slices(H264Context *h, int context_count)
H264Context *hx;
int i;
if (h->mb_y >= h->mb_height) {
av_log(h->avctx, AV_LOG_ERROR,
"Input contains more MB rows than the frame height.\n");
return AVERROR_INVALIDDATA;
}
if (h->avctx->hwaccel)
return 0;
if (context_count == 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册