From: Yu Watanabe Date: Tue, 13 Sep 2022 08:07:50 +0000 (+0900) Subject: creds-util: fix NULL pointer dereference X-Git-Tag: v252-rc1~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35aefda35f091ad95870f86ce712b2b6b3f3a5e2;p=thirdparty%2Fsystemd.git creds-util: fix NULL pointer dereference Fixes CID#1497840. --- diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index 02d86207c20..ecf90e2084a 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -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),