]> xenbits.xensource.com Git - libvirt.git/commit
virDomainControllerDefParseXML: Reject '-1' for PCI controller target properties
authorPeter Krempa <pkrempa@redhat.com>
Fri, 26 Aug 2022 12:02:52 +0000 (14:02 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Sep 2022 11:11:10 +0000 (13:11 +0200)
commit03c908bf9cd34a7ef8c46db0d29cf1750b682d4a
tree927baee5d353944e7ec028f6fbf3dc7be39a1852
parentb61854baf278af15c26bf3895d42e09ebe40b385
virDomainControllerDefParseXML: Reject '-1' for PCI controller target properties

All of the properties use '-1' as default and the code omits formatting
them when the property is '-1'. Additionally subsequent validation code
rejects all other negative values anyways.

Since we've never formatted '-1' into an XML formatted by libvirt we can
make the parser more strict, as we will never fail to parse existing
on-disk libvirt-owned XMLs.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2121627
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c