提交 889cd827 编写于 作者: J Jonathon Jongsma 提交者: Cole Robinson

conf: validate video resolution

Ensure that both x and y are non-zero when resolution is specified for a
video device.
Reviewed-by: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
上级 026c2ffb
......@@ -6319,6 +6319,12 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
return -1;
}
if (video->res && (video->res->x == 0 || video->res->y == 0)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("video resolution values must be greater than 0"));
return -1;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册