From 752c61ae71e5980a80523046c6486296822236b0 Mon Sep 17 00:00:00 2001 From: Skylot Date: Fri, 28 Jul 2023 20:09:54 +0100 Subject: [PATCH] fix: disable zip file checks for new JVM versions (#1962) --- .run/jadx-gui.run.xml | 12 ++++++++++++ jadx-cli/build.gradle.kts | 6 +++++- jadx-gui/build.gradle.kts | 1 + .../jadx/plugins/input/java/JavaInputLoader.java | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .run/jadx-gui.run.xml diff --git a/.run/jadx-gui.run.xml b/.run/jadx-gui.run.xml new file mode 100644 index 00000000..be0716cd --- /dev/null +++ b/.run/jadx-gui.run.xml @@ -0,0 +1,12 @@ + + + + diff --git a/jadx-cli/build.gradle.kts b/jadx-cli/build.gradle.kts index ba96dea4..aff5445d 100644 --- a/jadx-cli/build.gradle.kts +++ b/jadx-cli/build.gradle.kts @@ -25,7 +25,11 @@ dependencies { application { applicationName = "jadx" mainClass.set("jadx.cli.JadxCLI") - applicationDefaultJvmArgs = listOf("-Xms256M", "-XX:MaxRAMPercentage=70.0") + applicationDefaultJvmArgs = listOf( + "-Xms256M", + "-XX:MaxRAMPercentage=70.0", + "-Djdk.util.zip.disableZip64ExtraFieldValidation=true", // disable zip checks (#1962) + ) applicationDistribution.from("$rootDir") { include("README.md") include("NOTICE") diff --git a/jadx-gui/build.gradle.kts b/jadx-gui/build.gradle.kts index da250cfb..959f1e87 100644 --- a/jadx-gui/build.gradle.kts +++ b/jadx-gui/build.gradle.kts @@ -65,6 +65,7 @@ application { "-Dawt.useSystemAAFontSettings=lcd", "-Dswing.aatext=true", "-Djava.util.Arrays.useLegacyMergeSort=true", + "-Djdk.util.zip.disableZip64ExtraFieldValidation=true", // disable zip checks (#1962) "-XX:+IgnoreUnrecognizedVMOptions", "--add-opens=java.base/java.lang=ALL-UNNAMED", // for ktlint formatter ) diff --git a/jadx-plugins/jadx-java-input/src/main/java/jadx/plugins/input/java/JavaInputLoader.java b/jadx-plugins/jadx-java-input/src/main/java/jadx/plugins/input/java/JavaInputLoader.java index bd7b22ef..1d0980ae 100644 --- a/jadx-plugins/jadx-java-input/src/main/java/jadx/plugins/input/java/JavaInputLoader.java +++ b/jadx-plugins/jadx-java-input/src/main/java/jadx/plugins/input/java/JavaInputLoader.java @@ -101,7 +101,7 @@ public class JavaInputLoader { } }); } catch (Exception e) { - LOG.error("Failed to process zip file: {}", file.getAbsolutePath(), e); + LOG.error("Failed to process zip file: {}", name, e); } return result; }