mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 21:51:47 +00:00
Merge remote-tracking branch
'origin/GP-3498-dragonmacher-find-refs-exception' (Closes #5310)
This commit is contained in:
commit
d4b626efc2
@ -51,7 +51,6 @@ public class DecompilerFieldAccess extends DecompilerVariable {
|
||||
DataType dt = field.getDataType();
|
||||
dt = getBaseType(dt);
|
||||
if (!(dt instanceof Composite)) {
|
||||
// can the dt be a pointer?
|
||||
Msg.error(this, "Have a field for a type that is not a Composite type");
|
||||
return dt;
|
||||
}
|
||||
@ -65,6 +64,11 @@ public class DecompilerFieldAccess extends DecompilerVariable {
|
||||
}
|
||||
}
|
||||
|
||||
int n = composite.getNumComponents();
|
||||
if (offset >= n) {
|
||||
// how sure when this condition can happen, but we have seen this in the wild
|
||||
return null;
|
||||
}
|
||||
DataTypeComponent component = composite.getComponent(offset);
|
||||
if (component == null) {
|
||||
return null; // not sure what else to do
|
||||
|
Loading…
Reference in New Issue
Block a user