mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dns: Make reading resolv.conf more robust.
* dirmngr/dns.c (dns_resconf_loadfile): Skip "search" which begins with '.'. -- GnuPG-bug-id: 5657 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
fb26e144ad
commit
48359c7232
@ -5657,7 +5657,12 @@ skip:
|
||||
memset(resconf->search, '\0', sizeof resconf->search);
|
||||
|
||||
for (i = 1, j = 0; i < wc && j < lengthof(resconf->search); i++, j++)
|
||||
if (words[i][0] == '.') {
|
||||
/* Ignore invalid search spec. */
|
||||
j--;
|
||||
} else {
|
||||
dns_d_anchor(resconf->search[j], sizeof resconf->search[j], words[i], strlen(words[i]));
|
||||
}
|
||||
|
||||
break;
|
||||
case DNS_RESCONF_LOOKUP:
|
||||
|
Loading…
x
Reference in New Issue
Block a user