mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch
'origin/GP-2628_dev747368_search_for_encoded_strings--SQUASHED' (Closes #1582, Closes #2106)
This commit is contained in:
commit
1c6c8993d4
41 changed files with 3716 additions and 72 deletions
|
@ -26,8 +26,7 @@ import java.util.*;
|
|||
|
||||
import generic.stl.Pair;
|
||||
import ghidra.docking.settings.*;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.address.AddressOutOfBoundsException;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.data.RenderUnicodeSettingsDefinition.RENDER_ENUM;
|
||||
import ghidra.program.model.data.StringRenderParser.StringParseException;
|
||||
import ghidra.program.model.lang.Endian;
|
||||
|
@ -411,6 +410,19 @@ public class StringDataInstance {
|
|||
return buf.getAddress();
|
||||
}
|
||||
|
||||
public Address getEndAddress() {
|
||||
try {
|
||||
return length > 0 ? buf.getAddress().addNoWrap(length - 1) : buf.getAddress();
|
||||
}
|
||||
catch (AddressOverflowException e) {
|
||||
return buf.getAddress();
|
||||
}
|
||||
}
|
||||
|
||||
public AddressRange getAddressRange() {
|
||||
return new AddressRangeImpl(getAddress(), getEndAddress());
|
||||
}
|
||||
|
||||
private boolean isBadCharSize() {
|
||||
return (paddedCharSize < 1 || paddedCharSize > 8) ||
|
||||
!(charSize == 1 || charSize == 2 || charSize == 4) || (paddedCharSize < charSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue