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 2003/10/09 22:26:09 UTC
DO NOT REPLY [Bug 23707] New: -
RegularExpression: wrong Match end for fixed string match
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=23707>.
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=23707
RegularExpression: wrong Match end for fixed string match
Summary: RegularExpression: wrong Match end for fixed string
match
Product: Xerces-C++
Version: 2.3.0
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: cohrs@inviosoftware.com
RegularExpression::matches() calls context->fMatch->setEndPos()
with the wrong value when doing a fFixedStringOnly match and not
in XMLSCHEMA_MODE (i.e. a fixed string match using a Perl-like pattern).
The problem is this line of code (line 546 of RegularExpression.cpp in
the 2.3 src distro):
context->fMatch->setEndPos(0, ret + strLength);
strLength is the length of the "expression" parameter passed to matches().
I believe the value really should be the length of fFixedString. As it
currently exists, the call to setEndPos() generally sets a value that is
beyond the end of "expression".
This bug has no effect on XMLSCHEMA_MODE, which never uses this code.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org