aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-10 17:43:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-08-10 17:44:57 +0200
commit27cc5f1a975c03d9bb2fc7923f1ad267eb4cc4ab (patch)
tree095d576d2c6dbf644aaccaa52c3ebbc31cc83ab4
parent9fe9bd76418979ba12c80a3bbea918ef1c3e31c0 (diff)
openssl: fix potential NULL pointer deref in is_pkcs11_uri
Follow-up to 298d2565e Coverity CID 1438387
-rw-r--r--lib/vtls/openssl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index f747db9ac..78ee7e4f7 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -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