From: Vsevolod Stakhov Date: Wed, 8 Apr 2015 13:03:08 +0000 (+0100) Subject: Fix resolv.conf parsing with comments. X-Git-Tag: 0.9.0~287 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05d414237995f72d57e4a0b38a5252589039867b;p=rspamd.git Fix resolv.conf parsing with comments. --- diff --git a/contrib/librdns/util.c b/contrib/librdns/util.c index 7d9dc98d4..974c97554 100644 --- a/contrib/librdns/util.c +++ b/contrib/librdns/util.c @@ -398,7 +398,7 @@ rdns_resolver_conf_process_line (struct rdns_resolver *resolver, char *line) if (has_obrace && *p != ']') { return false; } - else if (*p != '\0' && *p != '\n') { + else if (*p != '\0' && !isspace (*p) && *p != '#') { return false; } *p = '\0';