From 0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 1 Jul 2013 17:05:33 +0200 Subject: tsocket: Pass the full port number to getaddrinfo(). The code stripped port numbers above 9999 down to 4 digits. Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Jul 1 21:10:53 CEST 2013 on sn-devel-104 --- lib/tsocket/tsocket_bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tsocket/tsocket_bsd.c') diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 4417f8e0454..fe39dfd5406 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -389,7 +389,7 @@ int _tsocket_address_inet_from_strings(TALLOC_CTX *mem_ctx, return -1; } - snprintf(port_str, sizeof(port_str) - 1, "%u", port); + snprintf(port_str, sizeof(port_str), "%u", port); ret = getaddrinfo(addr, port_str, &hints, &result); if (ret != 0) { -- cgit