From 3d89bad41f64906f42616b50170f3471003139f7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Oct 2007 16:27:52 +0200 Subject: Fix a segfault with an unknown interface "interfaces = foo" with "foo" not being a known interface segfaulted for me. (This used to be commit 556c33702ce6d6c7cde43ddfe965c78ebc2963d3) --- source3/lib/interface.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/lib/interface.c') diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 1471a06f46c..2eaadab0eca 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -460,7 +460,13 @@ static void interpret_interface(char *token) /* maybe it is a DNS name */ p = strchr_m(token,'/'); - if (!p && interpret_string_addr(&ss, token)) { + if (p == NULL) { + if (!interpret_string_addr(&ss, token)) { + DEBUG(2, ("interpret_interface: Can't find address " + "for %s\n", token)); + return; + } + for (i=0;i