Skip to content

Commit

Permalink
Make sure func_ty is not None before accessing func_ty.arg_names.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish committed Apr 20, 2019
1 parent 9859f2c commit 0a23c16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions angr/procedures/definitions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ def add_alias(self, name, *alt_names):
def _apply_metadata(self, proc, arch):
if proc.cc is None and arch.name in self.default_ccs:
proc.cc = self.default_ccs[arch.name](arch)
# Use inspect to extract the parameters from the run python function
proc.cc.func_ty.arg_names = inspect.getfullargspec(proc.run).args[1:]
if proc.cc.func_ty is not None:
# Use inspect to extract the parameters from the run python function
proc.cc.func_ty.arg_names = inspect.getfullargspec(proc.run).args[1:]
if proc.display_name in self.prototypes:
if proc.cc is None:
proc.cc = self.fallback_cc[arch.name](arch)
Expand Down

0 comments on commit 0a23c16

Please sign in to comment.