From 777737ea020106db4d376f2d8b3992198892f29a Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 17 Oct 2006 21:23:17 +0000 Subject: [PATCH] applied fix from Christopher Boumenot for bug #362714 on regexps missing * xmlregexp.c: applied fix from Christopher Boumenot for bug #362714 on regexps missing ']' Daniel --- ChangeLog | 5 +++++ xmlregexp.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index afa63683..225524ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 17 23:23:26 CEST 2006 Daniel Veillard + + * xmlregexp.c: applied fix from Christopher Boumenot for bug + #362714 on regexps missing ']' + Tue Oct 17 22:32:42 CEST 2006 Daniel Veillard * parserInternals.c: applied patch from Marius Konitzer to avoid diff --git a/xmlregexp.c b/xmlregexp.c index 58f480da..e7d519eb 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -4807,6 +4807,11 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) { int start = -1; int end = -1; + if (CUR == '\0') { + ERROR("Expecting ']'"); + return; + } + if ((CUR == '&') && (NXT(1) == '#')) { end = start = xmlFAParseCharRef(ctxt); xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg, @@ -4897,7 +4902,7 @@ xmlFAParsePosCharGroup(xmlRegParserCtxtPtr ctxt) { xmlFAParseCharRange(ctxt); } } while ((CUR != ']') && (CUR != '^') && (CUR != '-') && - (ctxt->error == 0)); + (CUR != 0) && (ctxt->error == 0)); } /**