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/06/25 21:58:37 UTC

DO NOT REPLY [Bug 21093] New: - xerces/util/XMLString::patternMatch bug (C++)

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=21093>.
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=21093

xerces/util/XMLString::patternMatch bug (C++)

           Summary: xerces/util/XMLString::patternMatch bug (C++)
           Product: Xerces-C++
           Version: 2.1.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: dong@endinfosys.com


-----------
problem:
-----------

when using DOMWriter
         with setFeature(XMLUni::fgDOMWRTSplitCdataSections, false);

The following xml could not be parsed (parse error: nestedCDATA):

         "<!DOCTYPE doc [<!ENTITY ast \"&#42;\"><!ENTITY nbsp \"&#160;\">]
><doc>abce</doc>"


-------------------
code fix:
-------------------

file name:      util/XMLString.cpp
func name:      XMLString::patternMatch

origional code:

        /////////////////////////////////////////////////////////////
        if (!patnMatch)
        {
                patnIndex = 0;
                patnMatch = (*srcPtr == pattern[patnIndex++]);
        }
        /////////////////////////////////////////////////////////////

should be replaced with

        /////////////////////////////////////////////////////////////
        if (!patnMatch)
        {
                patnIndex = 0;
                continue;
        }
        /////////////////////////////////////////////////////////////

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