]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage_conf.c: avoid overflow upon use of "z" or "Z" (zebi) suffix
authorJim Meyering <meyering@redhat.com>
Wed, 2 Sep 2009 07:58:28 +0000 (09:58 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 16:04:23 +0000 (18:04 +0200)
* src/storage_conf.c (virStorageSize): Don't try to compute 1024^7,
since it's too large for a 64-bit type.

src/storage_conf.c

index c4460691c747783e5fe12de20aa15569ea12be75..110f0ad3d29d73958f37572a5f98fed9951f02f9 100644 (file)
@@ -919,12 +919,6 @@ virStorageSize(virConnectPtr conn,
                 1024ull;
             break;
 
-        case 'z':
-        case 'Z':
-            mult = 1024ull * 1024ull * 1024ull * 1024ull * 1024ull *
-                1024ull * 1024ull;
-            break;
-
         default:
             virStorageReportError(conn, VIR_ERR_XML_ERROR,
                                   _("unknown size units '%s'"), unit);