Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1919

Access violation in AbstractDOMParser::docComment()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.1, 3.2.0
    • Non-Validating Parser
    • None
    • Windows 7
      Visual C++ 2008
      Static manually built version of Xerces 3.1.0

    Description

      I parse an XML document with the following code:
      XercesDOMParser parser;
      parser.setCreateEntityReferenceNodes(false);
      parser.setLoadExternalDTD(false);
      parser.setLoadSchema(false);
      parser.setSkipDTDValidation(true);
      parser.setExitOnFirstFatalError(false);
      MemBufInputSource source ((XMLByte const*)decoded.begin(), decoded.size(), L"");
      parser.parse(source);

      Parser crashes in:
      void AbstractDOMParser::docComment(const XMLCh* const comment)
      {
      if (fCreateCommentNodes)

      { DOMComment *dcom = fDocument->createComment(comment); castToParentImpl (fCurrentParent)->appendChildFast (dcom); // <----- fCurrentParent == 0 fCurrentNode = dcom; }

      }
      with fCurrentParent == 0.

      Current position of parser is line 233, column 17, i.e. straight after "<!-- Scripts -->"

      Here is the XML document:

      [attached as 'crash.xml']

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--crash.xml
          22 kB
          Dmitriy V'jukov

        Activity

          People

            bsk Boris Kolpackov
            dvyukov Dmitriy V'jukov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: