]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: netscaler: Don't forget to allocate storage for conn->src/dst.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 22 Jan 2020 14:31:09 +0000 (15:31 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 22 Jan 2020 14:33:03 +0000 (15:33 +0100)
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.

src/connection.c

index 580aa3313be89a9f7eb82ae9951efda62f9d1510..5c13a39a86075e4678438e2039e282df1ad5683d 100644 (file)
@@ -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;