Skip to content

Commit

Permalink
Handle strings in Call Analysis and Native Method Detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 authored and gompoc committed Aug 17, 2024
1 parent 859d859 commit b56f402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private static void InjectAttribute(ApplicationAnalysisContext appContext)
{
continue;
}
if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand)
if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand && operand.Value is not string)
{
var address = operand.Value.ToUInt64(null);
if (appContext.MethodsByAddress.TryGetValue(address, out var list))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static void AnalyzeMethod(ApplicationAnalysisContext appContext, MethodA

private static bool TryGetAddressFromInstruction(InstructionSetIndependentInstruction instruction, out ulong address)
{
if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand)
if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand && operand.Value is not string)
{
address = operand.Value.ToUInt64(null);
return true;
Expand Down

0 comments on commit b56f402

Please sign in to comment.