Skip to content

Commit 1a48b52

Browse files
committed
fix: correct method descriptor in path traversal sanitizer
1 parent 2f01ec3 commit 1a48b52

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/FilePathTraversal.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ public static Optional<Path> toRelativePath(Path path, Path currentDir) {
136136
type = HookType.BEFORE,
137137
targetClassName = "java.nio.file.Files",
138138
targetMethod = "readString")
139-
@MethodHook(
140-
type = HookType.BEFORE,
141-
targetClassName = "java.nio.file.Files",
142-
targetMethod = "newBufferedReader")
143139
@MethodHook(
144140
type = HookType.BEFORE,
145141
targetClassName = "java.nio.file.Files",
@@ -170,8 +166,9 @@ public static Optional<Path> toRelativePath(Path path, Path currentDir) {
170166
targetMethod = "newOutputStream")
171167
@MethodHook(
172168
type = HookType.BEFORE,
173-
targetClassName = "java.nio.file.probeContentType",
174-
targetMethod = "open")
169+
targetClassName = "java.nio.file.Files",
170+
targetMethod = "probeContentType",
171+
targetMethodDescriptor = "(Ljava/nio/file/Path;)Ljava/lang/String;")
175172
@MethodHook(
176173
type = HookType.BEFORE,
177174
targetClassName = "java.nio.channels.FileChannel",

0 commit comments

Comments
 (0)