提交 5dd3b5e3 编写于 作者: D Daniel P. Berrange

Fix missing OOM check in qemuParseCommandLine when splitting strings

The qemuParseCommandLine method did not check the return value of
virStringSplit to see if OOM had occurred. This lead to dereference
of a NULL pointer on OOM.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 5923ea67
......@@ -11387,7 +11387,8 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
* Set os.machine only if first parameter lacks '=' or
* contains explicit type='...' */
WANT_VALUE();
list = virStringSplit(val, ",", 0);
if (!(list = virStringSplit(val, ",", 0)))
goto error;
param = list[0];
if (STRPREFIX(param, "type="))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册