--- /Base64.java	2023-07-05 03:13:19.886025540 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Base64.java	2023-07-05 03:13:19.890025540 +0200
@@ -591,7 +591,7 @@
         }
 
         int startDst = bitlen / 8 - len; // to pad w/ nulls as per spec
-        byte[] resizedBytes = new byte[bitlen / 8];
+byte[] resizedBytes = new byte[bitlen / CHUNK_SIZE];
 
         System.arraycopy(bigBytes, startSrc, resizedBytes, startDst, len);
 
