From: Rich Felker Date: Fri, 29 Jan 2016 00:20:13 +0000 (-0500) Subject: fix logic for matching search/domain keywords in resolv.conf X-Git-Tag: v1.1.13~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fe8453d2ee128cfcf8777a19659f1c1f19e052ac;p=oweals%2Fmusl.git fix logic for matching search/domain keywords in resolv.conf --- diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c index 0743a88f..7e4dbe21 100644 --- a/src/network/resolvconf.c +++ b/src/network/resolvconf.c @@ -69,7 +69,7 @@ int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz) } if (!search) continue; - if (strncmp(line, "domain", 6) || strncmp(line, "search", 6) + if ((strncmp(line, "domain", 6) && strncmp(line, "search", 6)) || !isspace(line[6])) continue; for (p=line+7; isspace(*p); p++);