mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-10 11:26:15 -04:00
BUG/MINOR: ssl: Potential NULL deref in trace macro
'ctx' might be NULL when we exit 'ssl_sock_handshake', it can't be dereferenced without check in the trace macro. This was found by Coverity andraised in GitHub #3113. This patch should be backported up to 3.2.
This commit is contained in:
parent
e52e6f66ac
commit
a316342ec6
1 changed files with 1 additions and 1 deletions
|
|
@ -5909,7 +5909,7 @@ reneg_ok:
|
|||
if (!conn->err_code)
|
||||
conn->err_code = CO_ER_SSL_HANDSHAKE;
|
||||
|
||||
TRACE_ERROR("handshake error", SSL_EV_CONN_HNDSHK|SSL_EV_CONN_ERR, conn, ctx->ssl, &conn->err_code, &ctx->error_code);
|
||||
TRACE_ERROR("handshake error", SSL_EV_CONN_HNDSHK|SSL_EV_CONN_ERR, conn, ctx->ssl, &conn->err_code, (ctx ? &ctx->error_code : NULL));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue