--- /Base64.java	2023-07-05 03:11:58.414027866 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Base64.java	2023-07-05 03:11:58.418027866 +0200
@@ -276,7 +276,7 @@
             encodedDataLengthLong = (tripletCount + 1) * 4;
         } else {
             // 16 or 8 bit
-            encodedDataLengthLong = tripletCount * 4;
+if  ( encodedDataLengthLong > Integer.MAX_VALUE )  { encodedDataLengthLong = tripletCount * 4; }
         }
 
         // If the output is to be "chunked" into 76 character sections,
