This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch xerces-3.3
in repository https://gitbox.apache.org/repos/asf/xerces-c.git
The following commit(s) were added to refs/heads/xerces-3.3 by this push:
new 10cf840ca XERCESC-2271 - Improper handling of UCS-4 BOM
10cf840ca is described below
commit 10cf840cadc8387c3ad33e5acd2b3c7a1a429217
Author: Scott Cantor <[email protected]>
AuthorDate: Mon Nov 2 12:57:34 2026 -0500
XERCESC-2271 - Improper handling of UCS-4 BOM
https://issues.apache.org/jira/browse/XERCESC-2271
---
src/xercesc/internal/XMLReader.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/xercesc/internal/XMLReader.cpp
b/src/xercesc/internal/XMLReader.cpp
index 405474a02..a016d432c 100644
--- a/src/xercesc/internal/XMLReader.cpp
+++ b/src/xercesc/internal/XMLReader.cpp
@@ -1483,10 +1483,10 @@ void XMLReader::doInitDecode()
if (((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) &&
(fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) &&
(fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00)) )
{
- for (XMLSize_t i = 0; i < fRawBytesAvail; i++)
- fRawByteBuf[i] = fRawByteBuf[i+4];
+ for (XMLSize_t i = 4; i < fRawBytesAvail; i++)
+ fRawByteBuf[i - 4] = fRawByteBuf[i];
- fRawBytesAvail -=4;
+ fRawBytesAvail -= 4;
}
// Look at the raw buffer as UCS4 chars
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]