mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: require command args to be non-NULL
The virCommand APIs do not expect to be given a NULL value for an arg name or value. Such a mistake can lead to execution of the wrong command, as the NULL may prematurely terminate the list of args. Detect this and report suitable error messages. This identified a flaw in the storage test which was passing a NULL instead of the volume path. This flaw was then validated by an incorrect set of qemu-img args as expected data. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<volume>
|
||||
<name>OtherDemo.img</name>
|
||||
<target>
|
||||
<path>/var/lib/libvirt/images/OtherDemo.img</path>
|
||||
<format type="qcow2"/>
|
||||
</target>
|
||||
<capacity>0</capacity>
|
||||
|
||||
Reference in New Issue
Block a user