From: Willy Tarreau Date: Thu, 21 Jan 2016 12:51:56 +0000 (+0100) Subject: BUG/MEDIUM: servers state: server port is used uninitialized X-Git-Tag: v1.7-dev2~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3c7a83accebeaf1ac66f9b30238e8db4e6cd278;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: servers state: server port is used uninitialized Nenad spotted that the last fix was unfortunately wrong. Needs to be backported to 1.6 as well. --- diff --git a/src/server.c b/src/server.c index ab309abce5..3a04d22f6a 100644 --- a/src/server.c +++ b/src/server.c @@ -2162,7 +2162,7 @@ static void srv_update_state(struct server *srv, int version, char **params) int port; /* save the port, applies the new IP then reconfigure the port */ - get_host_port(&srv->addr); + port = get_host_port(&srv->addr); srv->addr.ss_family = addr.ss_family; str2ip2(params[0], &srv->addr, srv->addr.ss_family); set_host_port(&srv->addr, port);