Skip to content

Commit

Permalink
skip functions exceeding analysis limits in hlil/mlil_function helper…
Browse files Browse the repository at this point in the history
…s instead of causing an exception
  • Loading branch information
psifertex authored and xusheng6 committed Nov 30, 2023
1 parent a3ee4ce commit bf358ba
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/binaryview.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
TypeClass, BinaryViewEventType, FunctionGraphType, TagReferenceType, TagTypeType, RegisterValueType, LogLevel,
DisassemblyOption
)
from .exceptions import RelocationWriteException
from .exceptions import RelocationWriteException, ILException

from . import associateddatastore # required for _BinaryViewAssociatedDataStore
from .log import log_warn, log_error, Logger
Expand Down Expand Up @@ -2596,7 +2596,10 @@ def mlil_functions(
for func in AdvancedILFunctionList(
self, self.preload_limit if preload_limit is None else preload_limit, function_generator
):
mlil = func.mlil
try:
mlil = func.mlil
except ILException:
mlil = None
if mlil:
yield mlil

Expand All @@ -2611,7 +2614,10 @@ def hlil_functions(
for func in AdvancedILFunctionList(
self, self.preload_limit if preload_limit is None else preload_limit, function_generator
):
hlil = func.hlil
try:
hlil = func.hlil
except ILException:
hlil = None
if hlil:
yield hlil

Expand Down

0 comments on commit bf358ba

Please sign in to comment.