Describe the bug
APKEditor fail to protect large APK file. I'm using Java 19.0.2 on Windows 11
To Reproduce
Steps to reproduce the behavior:
java -jar APKEditor.jar p -i (apk)
Log/Stacktrace
00.027 I: [PROTECT] Loading apk ...
Unexpected error:
arraycopy: source index -1826102770 out of bounds for byte[102400]
java.lang.ArrayIndexOutOfBoundsException: arraycopy: source index -1826102770 out of bounds for byte[102400]
at java.base/java.lang.System.arraycopy(Native Method)
at com.reandroid.common.FileChannelInputStream.readBuffer(FileChannelInputStream.java:99)
at com.reandroid.common.FileChannelInputStream.read(FileChannelInputStream.java:77)
at com.reandroid.archive2.block.ZipHeader.readBasic(ZipHeader.java:45)
at com.reandroid.archive2.block.ZipHeader.readBytes(ZipHeader.java:33)
at com.reandroid.archive2.block.LocalFileHeader.read(LocalFileHeader.java:92)
at com.reandroid.archive2.model.LocalFileDirectory.visitLocalFile(LocalFileDirectory.java:55)
at com.reandroid.archive2.model.LocalFileDirectory.visit(LocalFileDirectory.java:41)
at com.reandroid.archive2.Archive.<init>(Archive.java:45)
at com.reandroid.archive2.Archive.<init>(Archive.java:63)
at com.reandroid.apk.ApkModule.loadApkFile(ApkModule.java:1126)
at com.reandroid.apkeditor.protect.Protector.run(Protector.java:48)
at com.reandroid.apkeditor.protect.Protector.execute(Protector.java:158)
at com.reandroid.apkeditor.Main.execute(Main.java:80)
at com.reandroid.apkeditor.Main.main(Main.java:41)
Describe the bug APKEditor fail to protect large APK file. I'm using Java 19.0.2 on Windows 11
To Reproduce Steps to reproduce the behavior:
java -jar APKEditor.jar p -i (apk)
Log/Stacktrace
Used apk file https://mega.nz/file/HMYGDJqR#6gb1g-scoQI_j3m7Tg9GzfMsOI9kHHlVj2M4HVSxqXs