summaryrefslogtreecommitdiff
path: root/zyklonb.c
diff options
context:
space:
mode:
Diffstat (limited to 'zyklonb.c')
-rw-r--r--zyklonb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zyklonb.c b/zyklonb.c
index 7c00583..f8d931a 100644
--- a/zyklonb.c
+++ b/zyklonb.c
@@ -995,7 +995,7 @@ socks_connect (const char *socks_host, const char *socks_port,
unsigned long port_no;
const struct servent *serv;
if ((serv = getservbyname (port, "tcp")))
- port_no = (uint16_t) serv->s_port;
+ port_no = (uint16_t) ntohs (serv->s_port);
else if (!xstrtoul (&port_no, port, 10) || !port_no || port_no > UINT16_MAX)
{
error_set (e, "invalid port number");