aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch')
-rw-r--r--main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch b/main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch
new file mode 100644
index 0000000000..fdd9c028ce
--- /dev/null
+++ b/main/musl/0034-fix-regression-in-support-for-resolv.conf-attempts-o.patch
@@ -0,0 +1,32 @@
+From 1a7fa5e5211a67e89861583516ee1566609467a1 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Fri, 21 Apr 2017 17:34:26 -0400
+Subject: [PATCH] fix regression in support for resolv.conf attempts option
+
+commit d6cb08bcaca4ff1f921375510ca72bccea969c75 moved the code and
+introduced an incorrect string offset for the new parsing, probably
+due to a copy-and-paste error.
+
+patch by Stefan Sedich.
+---
+ src/network/resolvconf.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c
+index 2cf1f475..4c3e4c4b 100644
+--- a/src/network/resolvconf.c
++++ b/src/network/resolvconf.c
+@@ -45,8 +45,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 (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;
+ }
+--
+2.13.0
+