Skip to content

Commit

Permalink
* Fixed masking of ObjectInputStream and ObjectOutputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
katherine-hough committed Nov 28, 2023
1 parent 6ecf460 commit 5a52ca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ public static boolean isApplicable(String className, String methodName) {
case "java/lang/reflect/ReflectAccess":
// Java >= 9
// TODO keep?
case "java/io/ObjectOutputStream":
case "java/io/ObjectInputStream":
return true;
default:
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,12 @@ public void visitCode() {
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean isInterface) {
Type[] args = Type.getArgumentTypes(desc);
String descWithoutStackFrame = desc.replace(PhosphorStackFrame.DESCRIPTOR, "");
if ((className.equals("java/io/ObjectOutputStream") || className.equals("java/io/ObjectInputStream"))
&& owner.equals("java/lang/Class")
&& name.startsWith("isInstance")) {
IS_INSTANCE.delegateVisit(mv);
return;
}
switch (owner) {
case "jdk/internal/reflect/Reflection":
maskReflection(opcode, owner, name, desc, isInterface);
Expand Down

0 comments on commit 5a52ca4

Please sign in to comment.