From: Ján Tomko Date: Mon, 27 Mar 2017 12:33:16 +0000 (+0200) Subject: storage: reject negative capacity X-Git-Tag: v3.2.0-rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2da7f545a34747ae21d73ce1369a6d2055f94ea4;p=thirdparty%2Flibvirt.git storage: reject negative capacity https://bugzilla.redhat.com/show_bug.cgi?id=1436119 --- diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 6b34cea032..28277e5efe 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1063,7 +1063,7 @@ virStorageSize(const char *unit, const char *val, unsigned long long *ret) { - if (virStrToLong_ull(val, NULL, 10, ret) < 0) { + if (virStrToLong_ullp(val, NULL, 10, ret) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("malformed capacity element")); return -1;