mirror of
https://github.com/Maschell/GhidraRPXLoader.git
synced 2024-11-25 09:26:56 +01:00
Ghidra 11.0+ Fix
- Make sure "d" exists before we try to use it - Check for length of 1 to actually catch empty strings
This commit is contained in:
parent
19c77f28f8
commit
c4370fd256
@ -311,11 +311,10 @@ public class Cafe_ElfExtension extends ElfExtension {
|
||||
Address tagAddress = fileInfoAddr.add(tagOffset);
|
||||
while (true) {
|
||||
Data d = elfLoadHelper.createData(tagAddress, TerminatedStringDataType.dataType);
|
||||
int length = d.getLength();
|
||||
if (length == 0) {
|
||||
if (d == null || d.getLength() <= 1) { // empty string has a length of 1 (just a null terminator)
|
||||
break;
|
||||
}
|
||||
tagAddress = tagAddress.add(length);
|
||||
tagAddress = tagAddress.add(d.getLength());
|
||||
}
|
||||
} catch (AddressOutOfBoundsException e) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user