mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +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;
|
1024ull;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'z':
|
|
||||||
case 'Z':
|
|
||||||
mult = 1024ull * 1024ull * 1024ull * 1024ull * 1024ull *
|
|
||||||
1024ull * 1024ull;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
virStorageReportError(conn, VIR_ERR_XML_ERROR,
|
virStorageReportError(conn, VIR_ERR_XML_ERROR,
|
||||||
_("unknown size units '%s'"), unit);
|
_("unknown size units '%s'"), unit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user