]> xenbits.xensource.com Git - libvirt.git/commit
conf: forbid negative values in virDomainParseScaledValue
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 29 Oct 2014 16:29:40 +0000 (17:29 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 30 Oct 2014 06:42:28 +0000 (07:42 +0100)
commit6c9a8a49c796f025f097a2cddb94116403296af1
tree4d2155ce5bf89c8b0cc62160c0ac5d97c9fc9173
parent089663aefaed6ae7acd5d8bdd362030ff661dce1
conf: forbid negative values in virDomainParseScaledValue

It makes sense for none of the callers to have negative value as an
output and, fortunately, if anyone tried defining domain with negative
memory or any other value parsed by virDomainParseScaledValue(), the
resulting value was 0.  That means we can error out during parsing as
it won't break anything.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1155843

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_conf.c