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

Array Bound Read, causing inconsistent segmentation violation in XMLFormatter::formatBuf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • Utilities
    • None
    • Operating System: All
      Platform: All
    • 25218

    Description

      from XMLFormatter.cpp, line 363

      when tmpPtr == endPtr it still gets dereferenced:

      while (!inEscapeList(actualEsc, *tmpPtr) && (tmpPtr < endPtr))
      tmpPtr++;

      this should have been:

      while ((tmpPtr < endPtr)) && !inEscapeList(actualEsc, *tmpPtr))
      tmpPtr++;

      It shows up as an array bound read in Purify when the array of characters is
      not null terminated.
      This is very evil since it will only cause a problem if the string was
      allocated at the very end of the free store.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeroen_dirks@peoplesoft.com Jeroen Dirks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: