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

avcodec/utils: Check that the video data[] arrays are NULL on the input to get_buffer_internal()

This should return an error to the decoder if the struct it tried to getbuffer is dirty
Reviewed-by: NReimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 bdf7093b
......@@ -870,6 +870,11 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
frame->height = FFMAX(avctx->height, AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres));
override_dimensions = 0;
}
if (frame->data[0] || frame->data[1] || frame->data[2] || frame->data[3]) {
av_log(avctx, AV_LOG_ERROR, "pic->data[*]!=NULL in get_buffer_internal\n");
return AVERROR(EINVAL);
}
}
ret = ff_decode_frame_props(avctx, frame);
if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册