summaryrefslogtreecommitdiff
path: root/src/cryptenroll/cryptenroll-tpm2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptenroll/cryptenroll-tpm2.c')
-rw-r--r--src/cryptenroll/cryptenroll-tpm2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptenroll/cryptenroll-tpm2.c b/src/cryptenroll/cryptenroll-tpm2.c
index b58f3a2e7f..9c1478c474 100644
--- a/src/cryptenroll/cryptenroll-tpm2.c
+++ b/src/cryptenroll/cryptenroll-tpm2.c
@@ -42,7 +42,7 @@ static int search_policy_hash(
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"TPM2 token data lacks 'tpm2-policy-hash' field.");
- r = unhexmem(json_variant_string(w), (size_t) -1, &thash, &thash_size);
+ r = unhexmem(json_variant_string(w), SIZE_MAX, &thash, &thash_size);
if (r < 0)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Invalid base64 data in 'tpm2-policy-hash' field.");