When setting the SOCKS proxy through the management interface, the
socks_proxy_port pointer would be set to a value that's no longer valid
by the time it's used by do_preresolve_host.
Signed-off-by: Thomas Veerman <thomas.veerman@wanwire.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20170707195941.61773-1-thomas.veerman@wanwire.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15018.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
... | ... |
@@ -150,7 +150,7 @@ management_callback_proxy_cmd(void *arg, const char **p) |
150 | 150 |
else if (streq(p[1], "SOCKS")) |
151 | 151 |
{ |
152 | 152 |
ce->socks_proxy_server = string_alloc(p[2], gc); |
153 |
- ce->socks_proxy_port = p[3]; |
|
153 |
+ ce->socks_proxy_port = string_alloc(p[3], gc); |
|
154 | 154 |
ret = true; |
155 | 155 |
} |
156 | 156 |
} |