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 "Dave Cohrs (JIRA)" <xe...@xml.apache.org> on 2005/04/18 18:11:46 UTC

[jira] Updated: (XERCESC-1021) RegularExpression: wrong Match end for fixed string match

     [ http://issues.apache.org/jira/browse/XERCESC-1021?page=all ]

Dave Cohrs updated XERCESC-1021:
--------------------------------

    Attachment: xercesbug.cpp

Program to reproduce the fixed string matching bug.
I compiled it like this: g++ -o x xercesbug.cpp -lxerces-c


> RegularExpression: wrong Match end for fixed string match
> ---------------------------------------------------------
>
>          Key: XERCESC-1021
>          URL: http://issues.apache.org/jira/browse/XERCESC-1021
>      Project: Xerces-C++
>         Type: Bug
>   Components: Utilities
>     Versions: 2.3.0
>  Environment: Operating System: All
> Platform: All
>     Reporter: Dave Cohrs
>     Assignee: Xerces-C Developers Mailing List
>  Attachments: xercesbug.cpp
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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