From 1be18b63de7c703c44c8ef2291f790ae42a68d8e Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Tue, 5 Dec 2023 21:34:49 -0800 Subject: [PATCH] Update macho.py Making linter happy --- mobsf/StaticAnalyzer/views/common/binary/macho.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mobsf/StaticAnalyzer/views/common/binary/macho.py b/mobsf/StaticAnalyzer/views/common/binary/macho.py index b96b3b6b02..a1a6ef85fb 100644 --- a/mobsf/StaticAnalyzer/views/common/binary/macho.py +++ b/mobsf/StaticAnalyzer/views/common/binary/macho.py @@ -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):