Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-4932 fixed code unit insertion issue

ghidra0076db5e3017eb6
diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java
index c6d1e0c2c5..d3fdf6194a 100644
--- a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java
+++ b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java
@@ -4527,7 +4527,7 @@ public class RecoveredClassHelper {
// apply the structure. It has to be one or the other and the correct length
// because of the check at the beginning of the script that checked for either
// array or structure of pointers and got size from them initially
- api.clearListing(vftableAddress);
+ api.clearListing(vftableAddress, vftableAddress.add(vftableStruct.getLength() - 1));
api.createData(vftableAddress, vftableStruct);
}