mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-0: Improving bounds check in DebugDirectory.java (Closes #7271)
This commit is contained in:
parent
ed2bc8c717
commit
97aadfa05a
1 changed files with 5 additions and 4 deletions
|
@ -92,8 +92,9 @@ public class DebugDirectory implements StructConverter, ByteArrayConverter {
|
|||
return;
|
||||
}
|
||||
if (sizeOfData > 0) {
|
||||
if (!validator.checkPointer(pointerToRawData)) {
|
||||
Msg.error(this, "Invalid pointerToRawData " + pointerToRawData);
|
||||
if (!validator.checkPointer(pointerToRawData + sizeOfData - 1)) {
|
||||
Msg.error(this, "Invalid debug pointerToRawData + sizeOfData: 0x%x"
|
||||
.formatted(pointerToRawData + sizeOfData - 1));
|
||||
sizeOfData = 0;
|
||||
reader.setPointerIndex(oldIndex);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue