[libvirt] [PATCH 1/2] storage: reject negative capacity

Ján Tomko jtomko at redhat.com
Mon Mar 27 12:42:07 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1436119
---
 src/conf/storage_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 6b34cea..28277e5 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;
-- 
2.10.2




More information about the libvir-list mailing list