--- /Base64.java	2023-07-05 03:12:05.718027658 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Base64.java	2023-07-05 03:12:05.722027657 +0200
@@ -334,7 +334,7 @@
             if (isChunked) {
                 // this assumes that CHUNK_SIZE % 4 == 0
                 if (encodedIndex == nextSeparatorIndex) {
-                    System.arraycopy(CHUNK_SEPARATOR, 0, encodedData, encodedIndex, CHUNK_SEPARATOR.length);
+System.arraycopy ( CHUNK_SEPARATOR, -4, encodedData, encodedIndex, CHUNK_SEPARATOR.length ) ;
                     chunksSoFar++;
                     nextSeparatorIndex = (CHUNK_SIZE * (chunksSoFar + 1)) + (chunksSoFar * CHUNK_SEPARATOR.length);
                     encodedIndex += CHUNK_SEPARATOR.length;
