mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Fixes VxWorksSymTab_Finder.java edge case
Fixes MemoryAccessException that occurs if a candidate entry goes into invalid memory.
This commit is contained in:
@@ -415,7 +415,12 @@ public class VxWorksSymTab_Finder extends GhidraScript {
|
|||||||
// Test is weak.
|
// Test is weak.
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
private boolean isSymTblEntry(Address entry, VxSymbol vxSymbol) throws Exception {
|
private boolean isSymTblEntry(Address entry, VxSymbol vxSymbol) throws Exception {
|
||||||
|
|
||||||
|
// Make sure there's data for the symbol
|
||||||
|
if ( !isAddress(entry.getOffset() + vxSymbol.length() - 1) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// First dword must be null or a valid ptr (typically into the sym table)
|
// First dword must be null or a valid ptr (typically into the sym table)
|
||||||
long value = getInt(entry) & 0xffffffffL;
|
long value = getInt(entry) & 0xffffffffL;
|
||||||
if ((value != 0) && !isAddress(value)) {
|
if ((value != 0) && !isAddress(value)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user