]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: xml: Disallow aliasing of negative numbers in virXPathULongLong
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Oct 2022 07:56:38 +0000 (09:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 2 Nov 2022 08:20:56 +0000 (09:20 +0100)
commite8ea7ac57942d3aca1d65e5deb9f21b82a5e8741
tree39b7a73e4cefe13b3943cafc92255a8d648eecaa
parentfd97c85b95a6507638a4e8517f8b41330dcca8ed
util: xml: Disallow aliasing of negative numbers in virXPathULongLong

Passing negative number as an alias for the max value is an anti-feature
we unfortunately allowed in virsh, but luckily never encouraged in the
XML.

Refuse numbers with negative sign when parsing unsigned long long from
XPaths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virxml.c