mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
storage_conf.c: avoid overflow upon use of "z" or "Z" (zebi) suffix
* src/storage_conf.c (virStorageSize): Don't try to compute 1024^7, since it's too large for a 64-bit type.
This commit is contained in:
parent
2e6bad311d
commit
cff257f584
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user