Skip to content

Commit

Permalink
Merge pull request #14 from CERTCC/issue63
Browse files Browse the repository at this point in the history
Fix #63
  • Loading branch information
sei-eschwartz authored Dec 11, 2023
2 parents fa6c2dd + 33db526 commit 6a989ea
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/main/java/kaiju/tools/fse/FnSetExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,35 +181,7 @@ private void computeFnSet(ProjectData currentData) {

if (fnhashmap != null) {

FnHashSaveable prop = null;
Class<?> c = null;
try {
c = Class.forName("ghidra.program.model.util.ObjectPropertyMap");
} catch (ClassNotFoundException e) {
//TODO
return;
}

try
{
// the get() function was introduced in Ghidra 10.2
c.getDeclaredMethod("get");
try {
prop = (FnHashSaveable) c.getDeclaredMethod("get").invoke(function.getEntryPoint());
} catch (Exception e) {
//TODO
return;
}
} catch(NoSuchMethodException e) {
// before Ghidra 10.2, it was getObject()
try {
prop = (FnHashSaveable) c.getDeclaredMethod("getObject").invoke(function.getEntryPoint());
} catch (Exception e2) {
//TODO
return;
}
}
//FnHashSaveable prop = (FnHashSaveable) fnhashmap.getObject(function.getEntryPoint());
FnHashSaveable prop = (FnHashSaveable) fnhashmap.get(function.getEntryPoint());

if (prop != null) {
// TODO: make it configurable which type of hash to use here
Expand Down

0 comments on commit 6a989ea

Please sign in to comment.