diff options
author | Andreas Schneider <asn@samba.org> | 2013-07-01 17:05:33 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-07-01 21:10:53 +0200 |
commit | 0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33 (patch) | |
tree | b4043ddb260cbc6f87147fbb1769bfac3b13fb6f | |
parent | 3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5 (diff) | |
download | samba-0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33.tar.gz samba-0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33.tar.bz2 samba-0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33.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
-rw-r--r-- | lib/tsocket/tsocket_bsd.c | 2 |
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) { |