projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix invalid free of partial addrinfo list with multiple services
[musl]
/
src
/
network
/
resolvconf.c
diff --git
a/src/network/resolvconf.c
b/src/network/resolvconf.c
index
2cf1f47
..
ceabf08
100644
(file)
--- a/
src/network/resolvconf.c
+++ b/
src/network/resolvconf.c
@@
-3,6
+3,7
@@
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
+#include <stdlib.h>
#include <netinet/in.h>
int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
#include <netinet/in.h>
int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
@@
-45,8
+46,8
@@
int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
if (z != p) conf->ndots = x > 15 ? 15 : x;
}
p = strstr(line, "attempts:");
if (z != p) conf->ndots = x > 15 ? 15 : x;
}
p = strstr(line, "attempts:");
- if (p && isdigit(p[
6
])) {
- p +=
6
;
+ if (p && isdigit(p[
9
])) {
+ p +=
9
;
unsigned long x = strtoul(p, &z, 10);
if (z != p) conf->attempts = x > 10 ? 10 : x;
}
unsigned long x = strtoul(p, &z, 10);
if (z != p) conf->attempts = x > 10 ? 10 : x;
}