mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-0: Improving bounds check in DebugDirectory.java (Closes #7271)
This commit is contained in:
@@ -92,8 +92,9 @@ public class DebugDirectory implements StructConverter, ByteArrayConverter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sizeOfData > 0) {
|
if (sizeOfData > 0) {
|
||||||
if (!validator.checkPointer(pointerToRawData)) {
|
if (!validator.checkPointer(pointerToRawData + sizeOfData - 1)) {
|
||||||
Msg.error(this, "Invalid pointerToRawData " + pointerToRawData);
|
Msg.error(this, "Invalid debug pointerToRawData + sizeOfData: 0x%x"
|
||||||
|
.formatted(pointerToRawData + sizeOfData - 1));
|
||||||
sizeOfData = 0;
|
sizeOfData = 0;
|
||||||
reader.setPointerIndex(oldIndex);
|
reader.setPointerIndex(oldIndex);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user