r5898: Handle errors in the 'sync' name and IP address handling code.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 19 Mar 2005 06:07:33 +0000 (06:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:07 +0000 (13:11 -0500)
Andrew Bartlett
(This used to be commit 6b8b40f73bd8b7ce23effc8eb1d808db77bcbf8b)

source4/lib/socket/socket_ipv4.c

index 4f8b1e6dd65292fd796bf1856ada029b15e2da8b..93ddf6804696ea37e479ef599d587f65e7c7a427 100644 (file)
@@ -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