]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix ldns_fgetc bug similar to ldns_bgetc.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 14 Feb 2014 09:25:00 +0000 (09:25 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 14 Feb 2014 09:25:00 +0000 (09:25 +0000)
git-svn-id: file:///svn/unbound/trunk@3083 be551aaa-1e26-0410-a405-d3ace91eadb9

ldns/parse.c

index 809bd22864563136b659e957bcd8f671e9101cb9..d0934ffb1dc9866bdc8baa00b8370eccc422a180 100644 (file)
@@ -163,7 +163,11 @@ sldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *l
        return (ssize_t)i;
 
 tokenread:
-       sldns_fskipcs_l(f, del, line_nr);
+       if(*del == '"')
+               /* do not skip over quotes after the string, they are part
+                * of the next string.  But skip over whitespace (if needed)*/
+               sldns_fskipcs_l(f, del+1, line_nr);
+       else    sldns_fskipcs_l(f, del, line_nr);
        *t = '\0';
        if (p != 0) {
                return -1;