Commit 6e26c254 authored by Vitalii Irkha's avatar Vitalii Irkha

Fix null pointer dereference

Added input data check for verifyIdentity() API

Change-Id: Ic4fca882dacf5f9d5eccfde9e94c16ee7fe74df5
Signed-off-by: default avatarVitalii Irkha <v.irkha@samsung.com>
parent d14a9e2f
......@@ -1359,6 +1359,12 @@ static int verifyIdentity( void *data, mbedtls_x509_crt *crt, int depth, uint32_
{
return MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE;
}
if (NULL == crt || NULL == crt->raw.p)
{
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;
}
g_getIdentityCallback(&ctx, crt->raw.p, crt->raw.len);
if (0 == depth) // leaf certificate
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment