From: Christophe Jaillet Date: Mon, 14 May 2018 20:51:31 +0000 (+0000) Subject: I don't know if 'c' can be NULL here, but we should not dereference it before checking. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2611 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ab3d315434d3d59f36da7271aa2c493e692d472;p=thirdparty%2Fapache%2Fhttpd.git I don't know if 'c' can be NULL here, but we should not dereference it before checking. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831591 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index e310c09aa3d..5385dc516a5 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -2552,7 +2552,7 @@ int ssl_callback_alpn_select(SSL *ssl, void *arg) { conn_rec *c = (conn_rec*)SSL_get_app_data(ssl); - SSLConnRec *sslconn = myConnConfig(c); + SSLConnRec *sslconn; apr_array_header_t *client_protos; const char *proposed; size_t len; @@ -2563,6 +2563,7 @@ int ssl_callback_alpn_select(SSL *ssl, if (c == NULL) { return SSL_TLSEXT_ERR_OK; } + sslconn = myConnConfig(c); if (inlen == 0) { /* someone tries to trick us? */