mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-2048 addressing code review comments
GP-2048 offcut format strings
This commit is contained in:
parent
3a09507990
commit
51a433ef04
2 changed files with 27 additions and 10 deletions
|
@ -109,6 +109,25 @@ public class PcodeFunctionParser {
|
|||
functionName, data.getDefaultValueRepresentation()));
|
||||
hasDefinedFormatString = true;
|
||||
}
|
||||
else {
|
||||
//check for offcut references into a larger defined string
|
||||
Data containing = program.getListing().getDataContaining(ramSpaceAddress);
|
||||
if (containing == null) {
|
||||
continue;
|
||||
}
|
||||
if (addressToCandidateData.containsKey(containing.getAddress())) {
|
||||
StringDataInstance entire =
|
||||
StringDataInstance.getStringDataInstance(containing);
|
||||
String subString = entire.getByteOffcut(
|
||||
(int) (ramSpaceAddress.getOffset() - containing.getAddress().getOffset()))
|
||||
.getStringValue();
|
||||
if (subString != null) {
|
||||
functionCallDataList.add(new FunctionCallData(ast.getSeqnum().getTarget(),
|
||||
functionName, subString));
|
||||
hasDefinedFormatString = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return hasDefinedFormatString;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue