Commit dc99df93 authored by William M. Brack's avatar William M. Brack
Browse files

fixed xmlFAParseCharRange for Unicode ranges with patch from Charles

* xmlregexp.c: fixed xmlFAParseCharRange for Unicode ranges
  with patch from Charles Bozeman.
parent 9887395b
Sat Dec 27 09:53:06 HKT 2003 William Brack <wbrack@mmm.com.hk>
* xmlregexp.c: fixed xmlFAParseCharRange for Unicode ranges
with patch from Charles Bozeman.
Fri Dec 26 14:03:41 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
* xmlregexp.c: fixed problem causing segfault on validation error
......
......@@ -3533,7 +3533,7 @@ xmlFAParseCharRef(xmlRegParserCtxtPtr ctxt) {
*/
static void
xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
int cur;
int cur, len;
int start = -1;
int end = -1;
......@@ -3560,13 +3560,14 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
return;
}
end = start;
len = 1;
} else if ((cur != 0x5B) && (cur != 0x5D)) {
end = start = cur;
end = start = CUR_SCHAR(ctxt->cur, len);
} else {
ERROR("Expecting a char range");
return;
}
NEXT;
NEXTL(len);
if (start == '-') {
return;
}
......@@ -3593,13 +3594,14 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
ERROR("Invalid escape value");
return;
}
len = 1;
} else if ((cur != 0x5B) && (cur != 0x5D)) {
end = cur;
end = CUR_SCHAR(ctxt->cur, len);
} else {
ERROR("Expecting the end of a char range");
return;
}
NEXT;
NEXTL(len);
/* TODO check that the values are acceptable character ranges for XML */
if (end < start) {
ERROR("End of range is before start of range");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment