summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-11-07 15:19:09 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-10 14:24:20 +1100
commita7c1add5c49e4c241bfe95ca018b75a2889a2141 (patch)
treeaed57ce4e31e87cc2b164edf92d2abbf32d6eea5 /source4
parente118d91a63df15edc71ca28f456197e9a36e648a (diff)
downloadsamba-a7c1add5c49e4c241bfe95ca018b75a2889a2141.tar.gz
samba-a7c1add5c49e4c241bfe95ca018b75a2889a2141.tar.bz2
samba-a7c1add5c49e4c241bfe95ca018b75a2889a2141.zip
s4-socket: detect NULL server in socket connection code
return NT_STATUS_NOT_FOUND instead of a segfault Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/socket/connect_multi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c
index 96277a6139..5358606896 100644
--- a/source4/lib/socket/connect_multi.c
+++ b/source4/lib/socket/connect_multi.c
@@ -132,6 +132,11 @@ static void connect_multi_next_socket(struct composite_context *result)
multi->num_connects_sent += 1;
+ if (multi->server_address == NULL) {
+ composite_error(result, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ return;
+ }
+
state = talloc(multi, struct connect_one_state);
if (composite_nomem(state, result)) return;