[libvirt] [PATCH] util: require command args to be non-NULL

Michal Privoznik mprivozn at redhat.com
Mon Dec 17 13:37:01 UTC 2018

On 12/17/18 2:20 PM, Daniel P. Berrangé wrote:
> 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 at redhat.com>
> ---
>  src/util/vircommand.c                                | 10 ++++++++++
>  tests/storagevolxml2argvdata/qcow2-zerocapacity.argv |  2 +-
>  tests/storagevolxml2xmlin/vol-qcow2-zerocapacity.xml |  1 +


And also now you push the other patch unchanged.


More information about the libvir-list mailing list