From: Olivier Houchard Date: Wed, 22 Jan 2020 14:31:09 +0000 (+0100) Subject: BUG/MEDIUM: netscaler: Don't forget to allocate storage for conn->src/dst. X-Git-Tag: v2.2-dev2~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a9dbe58a66516e6acc504ed2f185fd9d86a5e6d;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: netscaler: Don't forget to allocate storage for conn->src/dst. In conn_recv_netscaler_cip(), don't forget to allocate conn->src and conn->dst, as those are now dynamically allocated. Not doing so results in getting a crash when using netscaler. This should fix github issue #460. This should be backported to 2.1. --- diff --git a/src/connection.c b/src/connection.c index 580aa3313b..5c13a39a86 100644 --- a/src/connection.c +++ b/src/connection.c @@ -814,6 +814,9 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag) if (!conn_ctrl_ready(conn)) goto fail; + if (!sockaddr_alloc(&conn->src) || !sockaddr_alloc(&conn->dst)) + goto fail; + if (!fd_recv_ready(conn->handle.fd)) goto not_ready;