[libxml2] 570702 fix a bug in regexp determinism checking



commit 11e28e4dfb84804474a3d7a4bfb08bae8f00bc0a
Author: Daniel Veillard <veillard redhat com>
Date:   Wed Aug 12 12:21:42 2009 +0200

    570702 fix a bug in regexp determinism checking
    
    * xmlregexp.c: xmlFAComputesDeterminism was bugged as it removed as
      coalesced transitions on with sane source destination and atoms but
      not looking at counters

 xmlregexp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/xmlregexp.c b/xmlregexp.c
index 73598a5..5a48c7a 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -2646,7 +2646,9 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
 		    continue;
 		if (t2->atom != NULL) {
 		    if (t1->to == t2->to) {
-			if (xmlFAEqualAtoms(t1->atom, t2->atom))
+			if (xmlFAEqualAtoms(t1->atom, t2->atom) &&
+                            (t1->counter == t2->counter) &&
+                            (t1->count == t2->count))
 			    t2->to = -1; /* eliminated */
 		    }
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]