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 b344d033d XERCESC-2265 - Base64 decoder mishandles 0xFF
b344d033d is described below
commit b344d033d60440b48448e61c057ead350e74b71b
Author: Scott Cantor <[email protected]>
AuthorDate: Thu Aug 13 12:37:09 2026 -0400
XERCESC-2265 - Base64 decoder mishandles 0xFF
https://issues.apache.org/jira/browse/XERCESC-2265
---
src/xercesc/util/Base64.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/xercesc/util/Base64.cpp b/src/xercesc/util/Base64.cpp
index 9bba500eb..9f494733c 100644
--- a/src/xercesc/util/Base64.cpp
+++ b/src/xercesc/util/Base64.cpp
@@ -29,7 +29,7 @@ XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// constants
// ---------------------------------------------------------------------------
-static const int BASELENGTH = 255;
+static const int BASELENGTH = 256;
static const int FOURBYTE = 4;
// ---------------------------------------------------------------------------
@@ -75,7 +75,7 @@ const XMLByte Base64::base64Inverse[BASELENGTH] =
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF
};
const XMLByte Base64::base64Padding = chEqual;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]