mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Fix for TypeDef and Void causing exceptions in FillOutStructure
This commit is contained in:
parent
a80ba76b04
commit
7ba8961bdb
2 changed files with 13 additions and 1 deletions
|
@ -91,10 +91,22 @@ public enum MetaDataType {
|
|||
return aCopy;
|
||||
}
|
||||
if (aMeta == MetaDataType.PTR) {
|
||||
if (a instanceof TypeDef) {
|
||||
a = ((TypeDef) a).getBaseDataType();
|
||||
}
|
||||
if (b instanceof TypeDef) {
|
||||
b = ((TypeDef) b).getBaseDataType();
|
||||
}
|
||||
a = ((Pointer) a).getDataType();
|
||||
b = ((Pointer) b).getDataType();
|
||||
}
|
||||
else if (aMeta == MetaDataType.ARRAY) {
|
||||
if (a instanceof TypeDef) {
|
||||
a = ((TypeDef) a).getBaseDataType();
|
||||
}
|
||||
if (b instanceof TypeDef) {
|
||||
b = ((TypeDef) b).getBaseDataType();
|
||||
}
|
||||
if (!(a instanceof Array) || !(b instanceof Array)) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class NoisyStructureBuilder {
|
|||
* @param dt is the data-type of field if known (null otherwise)
|
||||
*/
|
||||
public void addDataType(long offset, DataType dt) {
|
||||
if (dt == null) {
|
||||
if (dt == null || dt instanceof VoidDataType) {
|
||||
computeMax(offset, 1);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue