summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-03-19 06:07:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:07 -0500
commit3240f01636db144f765ec193de10196106537eb9 (patch)
tree03d4ec0d670825d37a41b59f60183e05769e10e7 /source4/lib
parent48e7cfbe1d7cf1f077ce9db97fca294e387fd579 (diff)
downloadsamba-3240f01636db144f765ec193de10196106537eb9.tar.gz
samba-3240f01636db144f765ec193de10196106537eb9.tar.bz2
samba-3240f01636db144f765ec193de10196106537eb9.zip
r5898: Handle errors in the 'sync' name and IP address handling code.
Andrew Bartlett (This used to be commit 6b8b40f73bd8b7ce23effc8eb1d808db77bcbf8b)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/socket_ipv4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/socket/socket_ipv4.c b/source4/lib/socket/socket_ipv4.c
index 4f8b1e6dd6..93ddf68046 100644
--- a/source4/lib/socket/socket_ipv4.c
+++ b/source4/lib/socket/socket_ipv4.c
@@ -111,6 +111,9 @@ static NTSTATUS ipv4_connect(struct socket_context *sock,
}
srv_ip = interpret_addr2(srv_address);
+ if (!srv_ip.addr) {
+ return NT_STATUS_BAD_NETWORK_NAME;
+ }
ZERO_STRUCT(srv_addr);
#ifdef HAVE_SOCK_SIN_LEN