openssl: fix potential NULL pointer deref in is_pkcs11_uri

Follow-up to 298d2565e
Coverity CID 1438387
This commit is contained in:
Daniel Stenberg 2018-08-10 17:43:31 +02:00
parent 9fe9bd7641
commit 27cc5f1a97
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 6 deletions

View File

@ -564,12 +564,7 @@ static int ssl_ui_writer(UI *ui, UI_STRING *uis)
*/
static bool is_pkcs11_uri(const char *string)
{
if(strncasecompare(string, "pkcs11:", 7)) {
return TRUE;
}
else {
return FALSE;
}
return (string && strncasecompare(string, "pkcs11:", 7));
}
#endif