mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
Fix Coverity ID 871 -- do not dereference "sp" before checking for NULL
This commit is contained in:
parent
d75fe9b393
commit
147a2e3440
@ -552,11 +552,13 @@ static struct in6_addr interpret_addr6(const char *name)
|
||||
char addr[INET6_ADDRSTRLEN];
|
||||
struct in6_addr dest6;
|
||||
const char *sp = name;
|
||||
char *p = strchr_m(sp, '%');
|
||||
char *p;
|
||||
int ret;
|
||||
|
||||
if (sp == NULL) return in6addr_any;
|
||||
|
||||
p = strchr_m(sp, '%');
|
||||
|
||||
if (strcasecmp(sp, "localhost") == 0) {
|
||||
sp = "::1";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user