Skip to content

Commit

Permalink
add table variable annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz committed Jun 11, 2024
1 parent 9548a39 commit 433a685
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion capa/features/extractors/dnfile/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,11 @@ def get_dotnet_table_row(pe: dnfile.dnPE, table_index: int, row_index: int) -> O
if row_index - 1 <= 0:
return None

table: Optional[dnfile.base.ClrMetaDataTable] = pe.net.mdtables.tables.get(table_index)
if table is None:
return None

try:
table = pe.net.mdtables.tables.get(table_index, [])
return table[row_index - 1]
except IndexError:
return None
Expand Down

0 comments on commit 433a685

Please sign in to comment.