]> git.99rst.org Git - openwrt-packages.git/blob
4f4e57ce7d44a920ae422e00d4c124e2d9f3e2ee
[openwrt-packages.git] /
1 commit ad9954f2e723d37fed3a3a777fa6eecfa930fd11
2 Author: Olivier Houchard <ohouchard@haproxy.com>
3 Date: Wed Jan 22 15:31:09 2020 +0100
4
5 BUG/MEDIUM: netscaler: Don't forget to allocate storage for conn->src/dst.
6
7 In conn_recv_netscaler_cip(), don't forget to allocate conn->src and
8 conn->dst, as those are now dynamically allocated. Not doing so results in
9 getting a crash when using netscaler.
10 This should fix github issue #460.
11
12 This should be backported to 2.1.
13
14 (cherry picked from commit 1a9dbe58a66516e6acc504ed2f185fd9d86a5e6d)
15 Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
16
17 diff --git a/src/connection.c b/src/connection.c
18 index 7a2ab2499..b48049e5a 100644
19 --- a/src/connection.c
20 +++ b/src/connection.c
21 @@ -740,6 +740,9 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
22 if (!conn_ctrl_ready(conn))
23 goto fail;
24
25 + if (!sockaddr_alloc(&conn->src) || !sockaddr_alloc(&conn->dst))
26 + goto fail;
27 +
28 if (!fd_recv_ready(conn->handle.fd))
29 goto not_ready;
30
git clone https://git.99rst.org/PROJECT