Commit Diff
Diff:
0b83f180e57d929b3b18870cbaff67116bcf7f02
ac22afcb4b20110416f97749521c45391e45618d
Commit:
ac22afcb4b20110416f97749521c45391e45618d
Tree:
0614edb3cff6106cf415f5ec5e6db4e65efb4c87
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Apr 14 10:13:49 2014 UTC
Message:
* version 1.7 allowed escaped quotes, but it wasn't correct. * this should fix that. Tested on OpenBSD 5.4, FreeBSD 10
blob - 365497f7ac5ad641efa1e81ba714448d2c7c00c3
blob + 6af93194635bebe78103e8683f723e9545e69a4b
--- example4.conf
+++ example4.conf
@@ -82,7 +82,7 @@ zone "centroid.eu" {
; balance these two
centroid.eu,balance,3600,62.75.160.180
centroid.eu,balance,3600,192.168.0.24
- centroid.eu,txt,3600,"1234\"\"1234\"\""
+ centroid.eu,txt,3600,"1234\"\"1234"
text.centroid.eu,txt,3600,",,,,this is valid,,,too,,,"
}
blob - 615394c32d74aa9c637889a9d8ad90a79e09ba50
blob + ef1aaf79971b684fa6c1d64aa1e2e279c6938d94
--- parse.y
+++ parse.y
@@ -58,7 +58,7 @@ typedef struct {
int lineno;
} YYSTYPE;
-static const char rcsid[] = "$Id: parse.y,v 1.8 2014/04/14 10:04:53 pjp Exp $";
+static const char rcsid[] = "$Id: parse.y,v 1.9 2014/04/14 10:13:49 pjp Exp $";
static int version = 0;
static int state = 0;
static uint8_t region = 0;
@@ -1136,6 +1136,7 @@ get_quotedstring(char *buf, int n)
return (0);
} else if (c == '"') {
if (stack == 0) {
+ *cs++ = c;
*cs = '\0';
return (0);
} else {
repomaster@centroid.eu