tpm2: use SIZE_MAX instead of strlen() for unhexmem()

This commit is contained in:
Dan Streetman
2023-08-24 12:33:26 -04:00
parent 193fd5730e
commit 7001a7daf7
+1 -1
View File
@@ -1738,7 +1738,7 @@ int tpm2_pcr_value_from_string(const char *arg, Tpm2PCRValue *ret_pcr_value) {
_cleanup_free_ void *buf = NULL;
size_t buf_size = 0;
r = unhexmem(p, strlen(p), &buf, &buf_size);
r = unhexmem(p, SIZE_MAX, &buf, &buf_size);
if (r < 0)
return log_error_errno(r, "Invalid pcr hash value '%s': %m", p);