Skip to content

Commit

Permalink
check cbm is not null before calling callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDavid committed Aug 4, 2023
1 parent 12e9f76 commit d6993a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tritondse/seeds_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ def __iter_new_inputs(self, execution: SymbolicExecutor) -> Generator[Seed, None
edge = (branch['srcAddr'], branch['dstAddr']) if typ == SymExType.CONDITIONAL_JMP else covitem

# Call on_branch_solving, if one replies False does not solve the branch
cb_result = all(cb(execution, execution.pstate, edge, typ) for cb in self.cbm.get_on_solving_callback())
if self.cbm is not None:
cb_result = all(cb(execution, execution.pstate, edge, typ) for cb in self.cbm.get_on_solving_callback())
else:
cb_result = True

# Add path_prefix in path predicate (regardless on whether we solve the item or not)
path_predicate.extend(x.getTakenPredicate() for x in p_prefix)
Expand Down

0 comments on commit d6993a6

Please sign in to comment.