tree-wide: use UINT64_MAX or friends
This commit is contained in:
@@ -138,7 +138,7 @@ int find_fido2_auto_data(
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"FIDO2 token data lacks 'fido2-credential' field.");
|
||||
|
||||
r = unbase64mem(json_variant_string(w), (size_t) -1, &cid, &cid_size);
|
||||
r = unbase64mem(json_variant_string(w), SIZE_MAX, &cid, &cid_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Invalid base64 data in 'fido2-credential' field.");
|
||||
@@ -150,7 +150,7 @@ int find_fido2_auto_data(
|
||||
|
||||
assert(!salt);
|
||||
assert(salt_size == 0);
|
||||
r = unbase64mem(json_variant_string(w), (size_t) -1, &salt, &salt_size);
|
||||
r = unbase64mem(json_variant_string(w), SIZE_MAX, &salt, &salt_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to decode base64 encoded salt.");
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ int find_pkcs11_auto_data(
|
||||
|
||||
assert(!key);
|
||||
assert(key_size == 0);
|
||||
r = unbase64mem(json_variant_string(w), (size_t) -1, &key, &key_size);
|
||||
r = unbase64mem(json_variant_string(w), SIZE_MAX, &key, &key_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to decode base64 encoded key.");
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ int find_tpm2_auto_data(
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"TPM2 token data lacks 'tpm2-blob' field.");
|
||||
|
||||
r = unbase64mem(json_variant_string(w), (size_t) -1, &blob, &blob_size);
|
||||
r = unbase64mem(json_variant_string(w), SIZE_MAX, &blob, &blob_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Invalid base64 data in 'tpm2-blob' field.");
|
||||
@@ -136,7 +136,7 @@ int find_tpm2_auto_data(
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"TPM2 token data lacks 'tpm2-policy-hash' field.");
|
||||
|
||||
r = unhexmem(json_variant_string(w), (size_t) -1, &policy_hash, &policy_hash_size);
|
||||
r = unhexmem(json_variant_string(w), SIZE_MAX, &policy_hash, &policy_hash_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Invalid base64 data in 'tpm2-policy-hash' field.");
|
||||
|
||||
@@ -320,7 +320,7 @@ static int parse_one_option(const char *option) {
|
||||
_cleanup_free_ void *cid = NULL;
|
||||
size_t cid_size;
|
||||
|
||||
r = unbase64mem(val, (size_t) -1, &cid, &cid_size);
|
||||
r = unbase64mem(val, SIZE_MAX, &cid, &cid_size);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to decode FIDO2 CID data: %m");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user