summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-04-05 07:36:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:50 -0500
commit432dfdbcd186cbe8b8a85701e792085de407d18a (patch)
treee1b1b973b6d8e221e35cd0345f7e83253ac3d59e /source4/lib
parentbfc40531785de9d3e66dab8211f83b2cfcc5581b (diff)
downloadsamba-432dfdbcd186cbe8b8a85701e792085de407d18a.tar.gz
samba-432dfdbcd186cbe8b8a85701e792085de407d18a.tar.bz2
samba-432dfdbcd186cbe8b8a85701e792085de407d18a.zip
r22089: check the return value of interpret_addr2()
(This used to be commit af6661e442ff37070cf49b6d9ab85a1c045ef293)
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 815db48b90..362224ebbb 100644
--- a/source4/lib/socket/socket_ipv4.c
+++ b/source4/lib/socket/socket_ipv4.c
@@ -361,6 +361,9 @@ static NTSTATUS ipv4_sendto(struct socket_context *sock,
srv_addr.sin_len = sizeof(srv_addr);
#endif
addr = interpret_addr2(dest_addr->addr);
+ if (addr.addr == 0) {
+ return NT_STATUS_HOST_UNREACHABLE;
+ }
srv_addr.sin_addr.s_addr = addr.addr;
srv_addr.sin_port = htons(dest_addr->port);
srv_addr.sin_family = PF_INET;