提交 14ee6a66 编写于 作者: J Jim Meyering

xend_internal.c: don't dereference NULL for unexpected input

* src/xen/xend_internal.c (xenDaemonDomainSetAutostart): Avoid a NULL
dereference upon non-SEXPR_VALUE'd on_xend_start.  This bug was
introduced by commit 37ce5600.
上级 6ef20bb7
......@@ -4411,7 +4411,7 @@ xenDaemonDomainSetAutostart(virDomainPtr domain,
if (autonode) {
const char *val = (autonode->u.s.car->kind == SEXPR_VALUE
? autonode->u.s.car->u.value : NULL);
if (!STREQ(val, "ignore") && !STREQ(val, "start")) {
if (!val || (!STREQ(val, "ignore") && !STREQ(val, "start"))) {
virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
"%s", _("unexpected value from on_xend_start"));
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册