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

Scanner permits some invalid character references.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • Miscellaneous
    • None
    • Operating System: All
      Platform: All
    • 18611

    Description

      Revision 1.40 of xercesc/internal/XMLScanner.cpp in CVS.

      I haven't tested this, but just looking at the code, there's no check for
      overflow when computing the value of a character reference.

      Assuming an unsigned int is 32-bit, it looks like � (2^32) is going
      to be treated as if it were �. This is a problem for any ref mod 2^32 (ref >
      2^32 -1) which falls between 0x10000-0x10FFFF, and less than 0xFFFD.

      See bool XMLScanner::scanCharRef(XMLCh& toFill, XMLCh& second).

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--xmlscanner.patch
          0.8 kB
          Michael Glavassevich

        Activity

          People

            Unassigned Unassigned
            mrglavas@ece.uwaterloo.ca Michael Glavassevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: