You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/10/14 16:31:43 UTC

DO NOT REPLY [Bug 13604] New: - while loop never terminates

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13604>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13604

while loop never terminates

           Summary: while loop never terminates
           Product: Xerces-C++
           Version: 2.1.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Utilities
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: gareth@decisionsoft.com


under certain inputs (e.g. string abcde, pattern ^abc) the while loop never
terminates in RegularExpression::match. This is a problem in the cvs tree.

patch by Jennifer "Georgina" Schachter:

Index: util/regx/RegularExpression.cpp
===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/xercesc/util/regx/RegularExpression.cpp,v
retrieving revision 1.2
diff -u -r1.2 RegularExpression.cpp
--- util/regx/RegularExpression.cpp	18 Mar 2002 19:29:53 -0000	1.2
+++ util/regx/RegularExpression.cpp	14 Oct 2002 14:29:05 -0000
@@ -693,13 +693,13 @@
 
	case Op::O_ANCHOR:
 
		if (!matchAnchor(context, tmpOp->getData(), offset))
 
			return -1;
-
		tmpOp->getNextOp();
+
		tmpOp = tmpOp->getNextOp();
 
		break;
 
	case Op::O_BACKREFERENCE:
 
		if (!matchBackReference(context, tmpOp->getData(), offset,
 
								direction, ignoreCase))
 
			return -1;
-
		tmpOp->getNextOp();
+
		tmpOp = tmpOp->getNextOp();
 
		break;
 
	case Op::O_STRING:
 
		if (!matchString(context, tmpOp->getLiteral(), offset, direction,

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org