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

Exception thrown when root element has no attributes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: Non-Validating Parser
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      27561

      Description

      There is some new code in 2.5.0 that checks whether the root element of an XML
      document has two namespace declarations. There is a mistake in the code,
      however, since it throws an exception (index out of range) when the root
      element has no attributes. The relevant code can be found in wfxmlscanner.cpp
      at line 1499. I patched it for now by adding an if condition:

      if (attCount)
      {
      ...
      }

      around the whole loop.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              matthew@acepoint.cz Matthew Gertner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: