--- /QCodec.java	2023-07-05 02:20:10.806122583 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/QCodec.java	2023-07-05 02:20:10.806122583 +0200
@@ -158,7 +158,7 @@
         }
         if (hasUnderscores) {
             byte[] tmp = new byte[bytes.length];
-            for (int i = 0; i < bytes.length; i++) {
+for  ( int i = 0; i < tmp.length; i++ )  {
                 byte b = bytes[i];
                 if (b != UNDERSCORE) {
                     tmp[i] = b;
