projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
878887c
)
fix uninitialized scopeid in lookups from hosts file and ip literals
author
Timo Teräs
<timo.teras@iki.fi>
Fri, 11 Sep 2015 06:15:06 +0000
(06:15 +0000)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 11 Sep 2015 06:15:06 +0000
(06:15 +0000)
src/network/lookup_ipliteral.c
patch
|
blob
|
history
diff --git
a/src/network/lookup_ipliteral.c
b/src/network/lookup_ipliteral.c
index 7bcb85fc500fe2f71126bc61b2e1b7f182927477..7ca70b227dba69c4490a0c8bd2d9b1baba7edc29 100644
(file)
--- a/
src/network/lookup_ipliteral.c
+++ b/
src/network/lookup_ipliteral.c
@@
-24,7
+24,7
@@
int __lookup_ipliteral(struct address buf[static 1], const char *name, int famil
if (family != AF_INET) {
char tmp[64];
char *p = strchr(name, '%'), *z;
- unsigned long long scopeid;
+ unsigned long long scopeid
= 0
;
if (p && p-name < 64) {
memcpy(tmp, name, p-name);
tmp[p-name] = 0;
@@
-44,8
+44,8
@@
int __lookup_ipliteral(struct address buf[static 1], const char *name, int famil
if (!scopeid) return EAI_NONAME;
}
if (scopeid > UINT_MAX) return EAI_NONAME;
- buf[0].scopeid = scopeid;
}
+ buf[0].scopeid = scopeid;
return 1;
}
return 0;