mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
GP-7174/7175: Fixing string formatter
This commit is contained in:
@@ -147,7 +147,7 @@ public class BindingTable extends OpcodeTable {
|
||||
ulebOffsets.add(reader.getPointerIndex() - origIndex);
|
||||
long count = reader.readNext(LEB128::unsigned);
|
||||
if (count < 0 || count > COUNT_LIMIT) {
|
||||
throw new MachException("BIND_OPCODE count exceeds limit (%s): %s"
|
||||
throw new MachException("BIND_OPCODE count exceeds limit (%d): %d"
|
||||
.formatted(COUNT_LIMIT, count));
|
||||
}
|
||||
ulebOffsets.add(reader.getPointerIndex() - origIndex);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class RebaseTable extends OpcodeTable {
|
||||
ulebOffsets.add(reader.getPointerIndex() - origIndex);
|
||||
int count = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
|
||||
if (count < 0 || count > COUNT_LIMIT) {
|
||||
throw new MachException("REBASE_OPCODE count exceeds limit (%s): %s"
|
||||
throw new MachException("REBASE_OPCODE count exceeds limit (%d): %d"
|
||||
.formatted(COUNT_LIMIT, count));
|
||||
}
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@@ -119,7 +119,7 @@ public class RebaseTable extends OpcodeTable {
|
||||
ulebOffsets.add(reader.getPointerIndex() - origIndex);
|
||||
int count = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
|
||||
if (count < 0 || count > COUNT_LIMIT) {
|
||||
throw new MachException("REBASE_OPCODE count exceeds limit (%s): %s"
|
||||
throw new MachException("REBASE_OPCODE count exceeds limit (%d): %d"
|
||||
.formatted(COUNT_LIMIT, count));
|
||||
}
|
||||
ulebOffsets.add(reader.getPointerIndex() - origIndex);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class AndroidBootLoaderHeader implements StructConverter {
|
||||
magic = reader.readNextAsciiString(AndroidBootLoaderConstants.BOOTLDR_MAGIC_SIZE);
|
||||
numberOfImages = reader.readNextInt();
|
||||
if (numberOfImages < 0 || numberOfImages > NUM_IMAGES_LIMIT) {
|
||||
throw new IOException("Image count exceeds limit (%s): %s"
|
||||
throw new IOException("Image count exceeds limit (%d): %d"
|
||||
.formatted(NUM_IMAGES_LIMIT, numberOfImages));
|
||||
}
|
||||
startOffset = reader.readNextInt();
|
||||
|
||||
Reference in New Issue
Block a user