From dba805dc04d85047b9f4d7df93b91705f00f19fa Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 11 Dec 2024 21:58:48 +0100 Subject: [PATCH] Fix potential overflow due to bad initialization. Might fix #72. Signed-off-by: Pol Henarejos --- src/fido/cbor_make_credential.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fido/cbor_make_credential.c b/src/fido/cbor_make_credential.c index 5640b2f..3f9bd5e 100644 --- a/src/fido/cbor_make_credential.c +++ b/src/fido/cbor_make_credential.c @@ -286,7 +286,7 @@ int cbor_make_credential(const uint8_t *data, size_t len) { if (strcmp(excludeList[e].type.data, (char *)"public-key") != 0) { continue; } - Credential ecred; + Credential ecred = {0}; if (credential_load(excludeList[e].id.data, excludeList[e].id.len, rp_id_hash, &ecred) == 0 && (ecred.extensions.credProtect != CRED_PROT_UV_REQUIRED ||