git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8b83d7
)
Fix a segfault with an unknown interface
author
Volker Lendecke
<vl@sernet.de>
Sat, 13 Oct 2007 14:27:52 +0000
(16:27 +0200)
committer
Volker Lendecke
<vl@sernet.de>
Sat, 13 Oct 2007 19:44:58 +0000
(21:44 +0200)
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
(This used to be commit
556c33702ce6d6c7cde43ddfe965c78ebc2963d3
)
source3/lib/interface.c
patch
|
blob
|
history
diff --git
a/source3/lib/interface.c
b/source3/lib/interface.c
index 1471a06f46cf0c5db3f01ee2163dfa34f7223fcc..2eaadab0ecada076fcb93132d8f54dfdfa17d8b7 100644
(file)
--- 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<total_probed;i++) {
if (addr_equal(&ss, &probed_ifaces[i].ip)) {
add_interface(&probed_ifaces[i]);