Skip to content

Commit

Permalink
BinaryView.get_functions_by_name retrieve regardless of platform when…
Browse files Browse the repository at this point in the history
… no platform passed
  • Loading branch information
emesare committed May 2, 2024
1 parent 87b1470 commit ee9248c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/binaryview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4463,8 +4463,6 @@ def get_functions_by_name(
SymbolType.FunctionSymbol, SymbolType.ImportedFunctionSymbol, SymbolType.LibraryFunctionSymbol
]

if plat == None:
plat = self.platform
fns = []
addresses = [sym.address for sym in self.get_symbols_by_name(name, ordered_filter=ordered_filter)]
if len(addresses) == 0 and name.startswith("sub_"):
Expand All @@ -4474,7 +4472,9 @@ def get_functions_by_name(
addresses = []
for address in addresses:
for fn in self.get_functions_at(address):
if fn.start == address and fn.platform == plat:
if fn.start == address:
if plat is not None and fn.platform == plat:
continue
fns.append(fn)
return fns

Expand Down

0 comments on commit ee9248c

Please sign in to comment.