dont fail when public key type is too large

This commit is contained in:
Conor Patrick
2019-05-18 14:34:54 -04:00
parent 035b1a8632
commit 31328fe7e7
2 changed files with 19 additions and 1 deletions

View File

@@ -929,7 +929,15 @@ uint8_t parse_credential_descriptor(CborValue * arr, CTAP_credentialDescriptor *
buflen = sizeof(type);
ret = cbor_value_copy_text_string(&val, type, &buflen, NULL);
check_ret(ret);
if (ret == CborErrorOutOfMemory)
{
cred->type = PUB_KEY_CRED_UNKNOWN;
}
else
{
check_ret(ret);
}
if (strncmp(type, "public-key",11) == 0)
{