Skip to content

Commit

Permalink
Merge pull request #2124 from MarcMil/devdotnet
Browse files Browse the repository at this point in the history
Prevent Unknown casts in .NET
  • Loading branch information
StevenArzt authored Nov 14, 2024
2 parents a1acd61 + a4f2f78 commit a81d271
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public Value jimplifyExpr(Body jb) {
break;
}
argument = simplifyComplexExpression(jb, argument);
if (convType instanceof UnknownType) {
//Decompilation errors might happen. But even in this case, we do not
//want to cast to unknown. In this case, let the type assigner figure something out.
return argument;
}

if (instruction.getCheckForOverflow()) {
return Jimple.v().newCheckedCastExpr(argument, convType);
Expand Down

0 comments on commit a81d271

Please sign in to comment.