creds-util: fix NULL pointer dereference

Fixes CID#1497840.
This commit is contained in:
Yu Watanabe
2022-09-13 21:05:16 +09:00
parent 6d64cb0625
commit 35aefda35f
+3 -2
View File
@@ -990,8 +990,9 @@ int decrypt_credential_and_warn(
r = tpm2_unseal(tpm2_device,
le64toh(t->pcr_mask),
le16toh(t->pcr_bank),
z ? z->data : NULL, z ? le32toh(z->size) : 0,
le64toh(z->pcr_mask),
z ? z->data : NULL,
z ? le32toh(z->size) : 0,
z ? le64toh(z->pcr_mask) : 0,
signature_json,
/* pin= */ NULL,
le16toh(t->primary_alg),