diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/namequery.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 4a3cf43b35..39159be41b 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -560,6 +560,13 @@ BOOL name_register_wins(const char *name, int name_type) int num_interfaces = iface_count(); struct in_addr sendto_ip; + /* + * Check if we have any interfaces, prevents a segfault later + */ + + if (num_interfaces <= 0) + return False; /* Should return some indication of the problem */ + /* * Do a broadcast register ... */ |