Skip to content

Commit

Permalink
Fix: that was a bad choice for the size of the stringTable array beca…
Browse files Browse the repository at this point in the history
…use even if findSymbols is not on the file can contain symbols. This was causing the pe unit test to fail. To get the right array size use sizeof(symbolTable)>0 which will be 1 only if findSymbols is true and the file actually contains symbols
  • Loading branch information
paxcut committed Aug 10, 2024
1 parent 2da5719 commit e28f007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patterns/pe.hexpat
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ struct StringTable {
SymbolString strings[while($ < addressof(this) + size)];
} [[inline]];

StringTable stringTable[coffHeader.numberOfSymbols>0] @ addressof(symbolTable) + sizeof(symbolTable);
StringTable stringTable[sizeof(symbolTable)>0] @ addressof(symbolTable) + sizeof(symbolTable);

// Rich Header
bool checkForRichHeader in;
Expand Down

0 comments on commit e28f007

Please sign in to comment.