Skip to content

Commit

Permalink
Update macho.py
Browse files Browse the repository at this point in the history
Making linter happy
  • Loading branch information
ajinabraham authored Dec 6, 2023
1 parent b986080 commit 1be18b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mobsf/StaticAnalyzer/views/common/binary/macho.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ def has_pie(self):
def has_canary(self):
stk_check = '___stack_chk_fail'
stk_guard = '___stack_chk_guard'
has_stk_check = any(str(func).strip() == stk_check for func in self.macho.imported_functions)
has_stk_guard = any(str(func).strip() == stk_guard for func in self.macho.imported_functions)

imp_func_gen = self.macho.imported_functions
has_stk_check = any(
str(func).strip() == stk_check for func in imp_func_gen)
has_stk_guard = any(
str(func).strip() == stk_guard for func in imp_func_gen)

return has_stk_check and has_stk_guard

def has_arc(self):
Expand Down

0 comments on commit 1be18b6

Please sign in to comment.