Skip to content

Commit

Permalink
Merge pull request #3 from cromulencellc/revert-1-larkwiot-patch-1
Browse files Browse the repository at this point in the history
Revert "Ghidra should not suppress exceptions from scripts"
  • Loading branch information
larkwiot authored Oct 11, 2021
2 parents 4541e15 + 098d4b0 commit 6724e05
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ public int getChunk(byte[] res, AddressSpace spc, long off, int size,
int readLen = super.getChunk(res, spc, off, size, stopOnUnintialized);
if (filterEnabled && filter != null) {
filterEnabled = false;
filter.filterRead(spc, off, readLen, res);
filterEnabled = true;
try {
filter.filterRead(spc, off, readLen, res);
}
finally {
filterEnabled = true;
}
}
return readLen;
}
Expand All @@ -44,8 +48,12 @@ public int getChunk(byte[] res, AddressSpace spc, long off, int size,
public void setChunk(byte[] res, AddressSpace spc, long off, int size) {
if (filterEnabled && filter != null) {
filterEnabled = false;
filter.filterWrite(spc, off, size, res);
filterEnabled = true;
try {
filter.filterWrite(spc, off, size, res);
}
finally {
filterEnabled = true;
}
}
super.setChunk(res, spc, off, size);
}
Expand Down

0 comments on commit 6724e05

Please sign in to comment.