mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2025-12-18 00:54:41 +08:00
Fix potential overflow due to bad initialization. Might fix #72.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -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) {
|
if (strcmp(excludeList[e].type.data, (char *)"public-key") != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Credential ecred;
|
Credential ecred = {0};
|
||||||
if (credential_load(excludeList[e].id.data, excludeList[e].id.len, rp_id_hash,
|
if (credential_load(excludeList[e].id.data, excludeList[e].id.len, rp_id_hash,
|
||||||
&ecred) == 0 &&
|
&ecred) == 0 &&
|
||||||
(ecred.extensions.credProtect != CRED_PROT_UV_REQUIRED ||
|
(ecred.extensions.credProtect != CRED_PROT_UV_REQUIRED ||
|
||||||
|
|||||||
Reference in New Issue
Block a user