git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d75fe9b
)
Fix Coverity ID 871 -- do not dereference "sp" before checking for NULL
author
Volker Lendecke
<vl@samba.org>
Thu, 12 Feb 2009 22:19:45 +0000
(23:19 +0100)
committer
Volker Lendecke
<vl@samba.org>
Thu, 12 Feb 2009 22:20:20 +0000
(23:20 +0100)
source4/lib/socket/socket_ip.c
patch
|
blob
|
history
diff --git
a/source4/lib/socket/socket_ip.c
b/source4/lib/socket/socket_ip.c
index cdb75fe0218d945714f520ebc8f505126db6b4bf..89b310a23afcd5c9ef25e7df17d55059c36e3c68 100644
(file)
--- a/
source4/lib/socket/socket_ip.c
+++ b/
source4/lib/socket/socket_ip.c
@@
-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";
}