mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
fvault2: volume size can be unsigned 64bit
This commit is contained in:
@@ -474,8 +474,8 @@ static int _parse_metadata_block_0x001a(
|
||||
r = _search_xml(xml, "com.apple.corestorage.lv.size", "integer", &log_vol_size_str);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
*log_vol_size = strtoul(log_vol_size_str, NULL, 16);
|
||||
if (*log_vol_size == 0) {
|
||||
*log_vol_size = strtoull(log_vol_size_str, NULL, 16);
|
||||
if (*log_vol_size == 0 || *log_vol_size == ULLONG_MAX) {
|
||||
r = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user