summaryrefslogtreecommitdiff
path: root/xmlregexp.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2007-06-13 20:47:19 +0200
committerMike Hommey <glandium@debian.org>2007-06-13 20:47:19 +0200
commit58f9d16e3a77d5207d9ccc413b61e2cb45190018 (patch)
treef190471ceb2bc35c076cc65159141813da73c8ee /xmlregexp.c
parent789259a1b6850d30acffbb62b11456b9ed7a8f59 (diff)
downloadlibxml2-58f9d16e3a77d5207d9ccc413b61e2cb45190018.tar.gz
Load /tmp/libxml2-2.6.29 intoupstream/2.6.29.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'xmlregexp.c')
-rw-r--r--xmlregexp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmlregexp.c b/xmlregexp.c
index 2a30d66..e729d57 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4751,6 +4751,8 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
type, 0, 0, NULL);
}
+ } else {
+ ERROR("Wrong escape sequence, misuse of character '\\'");
}
}
@@ -5307,6 +5309,10 @@ xmlRegexpCompile(const xmlChar *regexp) {
if (CUR != 0) {
ERROR("xmlFAParseRegExp: extra characters");
}
+ if (ctxt->error != 0) {
+ xmlRegFreeParserCtxt(ctxt);
+ return(NULL);
+ }
ctxt->end = ctxt->state;
ctxt->start->type = XML_REGEXP_START_STATE;
ctxt->end->type = XML_REGEXP_FINAL_STATE;