mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
5923ea67b1
commit
5dd3b5e32a
@ -11387,7 +11387,8 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
|
|||||||
* Set os.machine only if first parameter lacks '=' or
|
* Set os.machine only if first parameter lacks '=' or
|
||||||
* contains explicit type='...' */
|
* contains explicit type='...' */
|
||||||
WANT_VALUE();
|
WANT_VALUE();
|
||||||
list = virStringSplit(val, ",", 0);
|
if (!(list = virStringSplit(val, ",", 0)))
|
||||||
|
goto error;
|
||||||
param = list[0];
|
param = list[0];
|
||||||
|
|
||||||
if (STRPREFIX(param, "type="))
|
if (STRPREFIX(param, "type="))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user