提交 7ca6cd7d 编写于 作者: J John Ferlan

conf: Need to check for glisten before accessing

When formatting the graphics data for TYPE_SPICE, check if the glisten
is NULL before blindly referencing

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 5ddaa7ef
......@@ -22182,6 +22182,12 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
break;
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
if (!glisten) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("missing listen element for spice graphics"));
return -1;
}
switch (glisten->type) {
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS:
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册