mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GT-2715 - also handle actual strings in uninit'd memory
This commit is contained in:
parent
dd7ffda876
commit
54c650dea2
1 changed files with 5 additions and 2 deletions
|
@ -422,7 +422,7 @@ public class StringDataInstance {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStringValueNoTrim() {
|
private String getStringValueNoTrim() {
|
||||||
if (isProbe() || isBadCharSize()) {
|
if (isProbe() || isBadCharSize() || !buf.isInitializedMemory()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
byte[] stringBytes = convertPaddedToUnpadded(getStringBytes());
|
byte[] stringBytes = convertPaddedToUnpadded(getStringBytes());
|
||||||
|
@ -895,7 +895,10 @@ public class StringDataInstance {
|
||||||
}
|
}
|
||||||
|
|
||||||
String str = getStringValue();
|
String str = getStringValue();
|
||||||
if (str == null || str.length() == 0) {
|
if (str == null) {
|
||||||
|
return defaultStr;
|
||||||
|
}
|
||||||
|
if (str.length() == 0) {
|
||||||
return prefixStr;
|
return prefixStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue