Commit 05bf67b9 by Patrick Steinhardt

openssl_stream: fix NULL pointer dereference

parent 2baf854e
......@@ -383,6 +383,8 @@ static int verify_server_cert(SSL *ssl, const char *host)
GITERR_CHECK_ALLOC(peer_cn);
memcpy(peer_cn, ASN1_STRING_data(str), size);
peer_cn[size] = '\0';
} else {
goto cert_fail_name;
}
} else {
int size = ASN1_STRING_to_UTF8(&peer_cn, str);
......
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