~ubuntu-branches/ubuntu/precise/xerces-c/precise-security

« back to all changes in this revision

Viewing changes to src/xercesc/internal/XMLReader.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2010-02-06 16:46:23 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100206164623-xbntkcs6ks20nboa
Tags: 3.1.0-1
* New upstream release
* Updated standards version to 3.8.4.  No changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 */
17
17
 
18
18
/*
19
 
 * $Id: XMLReader.cpp 833045 2009-11-05 13:21:27Z borisk $
 
19
 * $Id: XMLReader.cpp 901280 2010-01-20 17:06:14Z johns $
20
20
 */
21
21
 
22
22
// ---------------------------------------------------------------------------
231
231
        case XMLRecognizer::UCS_4L :
232
232
        {
233
233
            if (fRawBytesAvail > 4 &&
234
 
                ((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) && (fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
235
 
                ((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) && (fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00))  )
 
234
                (((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) && (fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
 
235
                 ((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) && (fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00)))  )
236
236
            {
237
237
                fRawBufIndex += 4;
238
238
            }
775
775
            {
776
776
                if(isNCNameChar(fCharBuf[fCharIndex])) fCharIndex++;
777
777
                else if((fCharBuf[fCharIndex] >= 0xD800) && (fCharBuf[fCharIndex] <= 0xDB7F) && ((fCharBuf[fCharIndex+1] < 0xDC00) || (fCharBuf[fCharIndex+1] > 0xDFFF))) fCharIndex+=2;
 
778
                else break;
778
779
            }
779
780
        }
780
781
        else