Fix for exception when loading PE's with at least 1 empty section name

Incorporating the section index into the renamed empty section name
This commit is contained in:
Ryan Kurtz 2020-10-02 13:44:57 -04:00 committed by dragonmacher
parent 4bcce4d23b
commit be5664a446

View File

@ -655,9 +655,12 @@ public class PeLoader extends AbstractPeDebugLoader {
sections[i].getName() + " section");
}
long offset = sections[i].getPointerToRawData();
MemoryBlockUtils.createInitializedBlock(prog, false,
sections[i].getReadableName(), address, fileBytes, offset, dataSize, "",
"", r, w, x, log);
String sectionName = sections[i].getReadableName();
if (sectionName.isBlank()) {
sectionName = "SECTION." + i;
}
MemoryBlockUtils.createInitializedBlock(prog, false, sectionName, address,
fileBytes, offset, dataSize, "", "", r, w, x, log);
sectionToAddress.put(sections[i], address);
}
if (rawDataSize == virtualSize) {