diff --git a/lib/dns/resconf.c b/lib/dns/resconf.c index 47e8e4e663..d1d660e60a 100644 --- a/lib/dns/resconf.c +++ b/lib/dns/resconf.c @@ -585,9 +585,11 @@ irs_resconf_load(isc_mem_t *mctx, const char *filename, irs_resconf_t **confp) { } else { /* unrecognised word. Ignore entire line */ rval = ISC_R_SUCCESS; - stopchar = eatline(fp); - if (stopchar == EOF) { - break; + if (stopchar != '\n') { + stopchar = eatline(fp); + if (stopchar == EOF) { + break; + } } } if (ret == ISC_R_SUCCESS && rval != ISC_R_SUCCESS) {