[libxml2] Fix weird streaming RelaxNG errors
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix weird streaming RelaxNG errors
- Date: Tue, 15 May 2012 03:05:52 +0000 (UTC)
commit 9313ae8517a7d91d7b6671d566c4013b02982ee3
Author: Noam <bz npostavs recursor net>
Date: Tue May 15 11:03:46 2012 +0800
Fix weird streaming RelaxNG errors
For https://bugzilla.gnome.org/show_bug.cgi?id=512454
The bug was to use compiled determinitic automata when
the content model was found to be non-deterministic, leading
to random parsing errors.
relaxng.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/relaxng.c b/relaxng.c
index f575287..18f6a0b 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -3059,8 +3059,8 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
list = list->next;
}
xmlAutomataSetFinalState(ctxt->am, ctxt->state);
- def->contModel = xmlAutomataCompile(ctxt->am);
- xmlRegexpIsDeterminist(def->contModel);
+ if (xmlAutomataIsDeterminist(ctxt->am))
+ def->contModel = xmlAutomataCompile(ctxt->am);
xmlFreeAutomata(ctxt->am);
ctxt->state = oldstate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]