mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
Fix a segfault with an unknown interface
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
This commit is contained in:
parent
76d8dedc36
commit
556c33702c
@ -460,7 +460,13 @@ static void interpret_interface(char *token)
|
|||||||
|
|
||||||
/* maybe it is a DNS name */
|
/* maybe it is a DNS name */
|
||||||
p = strchr_m(token,'/');
|
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++) {
|
for (i=0;i<total_probed;i++) {
|
||||||
if (addr_equal(&ss, &probed_ifaces[i].ip)) {
|
if (addr_equal(&ss, &probed_ifaces[i].ip)) {
|
||||||
add_interface(&probed_ifaces[i]);
|
add_interface(&probed_ifaces[i]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user