From: Matthijs Mekking Date: Mon, 24 Oct 2011 09:37:48 +0000 (+0000) Subject: fix reading zone with parentheses X-Git-Tag: release-1.6.12~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bba90bdb71e018bf3d484d538dccc5df6156266;p=thirdparty%2Fldns.git fix reading zone with parentheses --- diff --git a/parse.c b/parse.c index 20110810..eab22dfc 100644 --- a/parse.c +++ b/parse.c @@ -111,7 +111,6 @@ ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *li continue; } - if (c == '\n' && p != 0 && t > token) { /* in parentheses */ if (line_nr) { @@ -124,7 +123,7 @@ ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *li /* check if we hit the delim */ for (d = del; *d; d++) { - if (c == *d && i > 0 && prev_c != '\\') { + if (c == *d && i > 0 && prev_c != '\\' && p == 0) { if (c == '\n' && line_nr) { *line_nr = *line_nr + 1; } @@ -299,7 +298,7 @@ ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t limit) /* check if we hit the delim */ for (d = del; *d; d++) { - if (c == *d && lc != '\\') { + if (c == *d && lc != '\\' && p == 0) { goto tokenread; } }