mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-24 21:21:56 +00:00
GP-302 Corrected DataUtilities improper clearing of code units
This commit is contained in:
parent
65d8648420
commit
16b177b2cf
@ -129,6 +129,11 @@ public final class DataUtilities {
|
||||
return data;
|
||||
}
|
||||
|
||||
if (clearMode == ClearDataMode.CLEAR_ALL_UNDEFINED_CONFLICT_DATA &&
|
||||
!Undefined.isUndefined(existingDT)) {
|
||||
throw new CodeUnitInsertionException("Could not create Data at address " + addr);
|
||||
}
|
||||
|
||||
// Check for external reference on pointer
|
||||
if (existingDT instanceof Pointer) {
|
||||
// TODO: This can probably be eliminated
|
||||
@ -199,11 +204,6 @@ public final class DataUtilities {
|
||||
private static void checkEnoughSpace(Program program, Address addr, int existingDataLen,
|
||||
DataTypeInstance dti, ClearDataMode mode) throws CodeUnitInsertionException {
|
||||
Listing listing = program.getListing();
|
||||
// int newSize = dti.getLength();
|
||||
// if (newSize <= existingDataLen) {
|
||||
// listing.clearCodeUnits(addr, addr, false);
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
Address end = addr.addNoWrap(existingDataLen - 1);
|
||||
Address newEnd = addr.addNoWrap(dti.getLength() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user