projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix out-of-bounds access in UTF-8 decoding
[musl]
/
src
/
network
/
getaddrinfo.c
diff --git
a/src/network/getaddrinfo.c
b/src/network/getaddrinfo.c
index
b341912
..
3d7b9ec
100644
(file)
--- a/
src/network/getaddrinfo.c
+++ b/
src/network/getaddrinfo.c
@@
-219,7
+219,7
@@
int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
while (j--) buf[i++].sa.sin.sin_family = AF_INET6;
}
while (j--) buf[i++].sa.sin.sin_family = AF_INET6;
}
- if (__dns_get_rr((void *)&buf[cnt], 0, 256, 1, reply, RR_CNAME, 1) < 0)
+ if (__dns_get_rr((void *)&buf[cnt], 0, 256, 1, reply, RR_CNAME, 1) <
=
0)
strcpy((void *)&buf[cnt], host);
for (i=0; i<cnt; i++) {
strcpy((void *)&buf[cnt], host);
for (i=0; i<cnt; i++) {