From 3c0c956720e0fb15316784e3631ad5bcfc3f0b28 Mon Sep 17 00:00:00 2001 From: yawkat Date: Mon, 30 Dec 2024 17:58:54 +0100 Subject: [PATCH] maybe it doesn't like the dots --- .../io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java b/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java index ec263fc..f6f8f96 100644 --- a/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java +++ b/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java @@ -1,8 +1,6 @@ package io.micronaut.fuzzing.jazzer; import org.gradle.api.file.DirectoryProperty; -import org.gradle.api.file.RegularFileProperty; -import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.TaskAction; @@ -44,7 +42,7 @@ public void run() throws IOException { this_dir=$(dirname "$0") LD_LIBRARY_PATH="$JVM_LD_LIBRARY_PATH":$this_dir $this_dir/jazzer_driver --agent_path=$this_dir/jazzer_agent_deploy.jar %s $@ """.formatted(String.join(" ", args)); - Path targetPath = getOutputDirectory().file(targetClass.substring(targetClass.indexOf('.') + 1)).get().getAsFile().toPath(); + Path targetPath = getOutputDirectory().file(targetClass.substring(targetClass.lastIndexOf('.') + 1)).get().getAsFile().toPath(); Files.writeString(targetPath, sh); Files.setPosixFilePermissions(targetPath, Set.of( PosixFilePermission.OWNER_READ,