GT-2715 - also handle actual strings in uninit'd memory

This commit is contained in:
dev747368 2019-05-08 18:17:25 -04:00
parent dd7ffda876
commit 54c650dea2

View File

@ -422,7 +422,7 @@ public class StringDataInstance {
}
private String getStringValueNoTrim() {
if (isProbe() || isBadCharSize()) {
if (isProbe() || isBadCharSize() || !buf.isInitializedMemory()) {
return null;
}
byte[] stringBytes = convertPaddedToUnpadded(getStringBytes());
@ -895,7 +895,10 @@ public class StringDataInstance {
}
String str = getStringValue();
if (str == null || str.length() == 0) {
if (str == null) {
return defaultStr;
}
if (str.length() == 0) {
return prefixStr;
}