summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket_bsd.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-07-01 17:05:33 +0200
committerKarolin Seeger <kseeger@samba.org>2013-07-02 13:07:35 +0200
commitbef3fc8527114adbaecaf6a7bbf17d49e598bf60 (patch)
treeb4043ddb260cbc6f87147fbb1769bfac3b13fb6f /lib/tsocket/tsocket_bsd.c
parent3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5 (diff)
downloadsamba-bef3fc8527114adbaecaf6a7bbf17d49e598bf60.tar.gz
samba-bef3fc8527114adbaecaf6a7bbf17d49e598bf60.tar.bz2
samba-bef3fc8527114adbaecaf6a7bbf17d49e598bf60.zip
tsocket: Pass the full port number to getaddrinfo().
The code stripped port numbers above 9999 down to 4 digits. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 1 21:10:53 CEST 2013 on sn-devel-104 Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Tue Jul 2 13:07:35 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib/tsocket/tsocket_bsd.c')
-rw-r--r--lib/tsocket/tsocket_bsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 4417f8e045..fe39dfd540 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) {