1
--- maradns-2.0.02/parse/Csv2_parse.c 2011-02-05 19:21:33.000000000 -0700
2
+++ maradns-2.0.03/parse/Csv2_parse.c 2011-02-15 14:12:35.000000000 -0700
4
-/* Copyright (c) 2004-2006 Sam Trenholme
5
+/* Copyright (c) 2004-2011 Sam Trenholme
10
return (csv2_is_alphanum(in) || in > 0x7f);
13
+/* Match on [0-9a-zA-z\-\_\/] or anything utf-8 */
14
+int csv2_is_dname(int32 in) {
15
+ return (csv2_is_alphanum(in) || in == '/' || in > 0x7f);
18
/* Match on [0-9a-zA-Z\-\_\%] or anything utf-8 */
19
int csv2_is_dchar(int32 in) {
20
return (csv2_is_text(in) || in == '%');
22
* first character of a hostname is already read and added to
23
* the output string */
24
if(starwhitis != 0 && starwhitis != 5) {
25
- if(csv2_is_text(look)) {
26
+ if(csv2_is_dname(look)) {
27
state = NON_DOT_STATE;
29
else if(look == '*') {
34
- else if(state == NON_DOT_STATE && csv2_is_text(look)) {
35
+ else if(state == NON_DOT_STATE && csv2_is_dname(look)) {
36
if(csv2_append_utf8(o,look) < 0) {
37
csv2_error(stream,"Error appending character");
40
/* text character after dot (or at beginning of string)
41
* means we process that text label in the hostname
42
* until we see a dot again */
43
- else if(state == DOT_STATE && csv2_is_text(look)) {
44
+ else if(state == DOT_STATE && csv2_is_dname(look)) {
45
state = NON_DOT_STATE;
46
if(csv2_append_utf8(o,look) < 0) {
47
csv2_error(stream,"Error appending character");