File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -150,9 +150,9 @@ impl fmt::Display for CheckSecResults {
150
150
/// }
151
151
/// ```
152
152
pub trait Properties {
153
- /// check import names for `_objc_release`
153
+ /// check symbol names for `_objc_release` or `_swift_release `
154
154
fn has_arc ( & self ) -> bool ;
155
- /// check import names for `___stack_chk_fail` or `___stack_chk_guard `
155
+ /// check symbol names for `___stack_chk_fail` `___stack_chk_guard` or `___chkstk_darwin `
156
156
fn has_canary ( & self ) -> bool ;
157
157
/// check data size of code signature in load commands
158
158
fn has_code_signature ( & self ) -> bool ;
@@ -178,8 +178,9 @@ impl Properties for MachO<'_> {
178
178
fn has_arc ( & self ) -> bool {
179
179
for i in self . symbols ( ) {
180
180
if let Ok ( ( symbol, _) ) = i {
181
- if symbol == "_objc_release" {
182
- return true ;
181
+ match symbol {
182
+ "_objc_release" | "_swift_release" => return true ,
183
+ _ => continue ,
183
184
}
184
185
}
185
186
}
@@ -189,7 +190,7 @@ impl Properties for MachO<'_> {
189
190
for i in self . symbols ( ) {
190
191
if let Ok ( ( symbol, _) ) = i {
191
192
match symbol {
192
- "___stack_chk_fail" | "___stack_chk_guard" => return true ,
193
+ "___stack_chk_fail" | "___stack_chk_guard" | "___chkstk_darwin" => return true ,
193
194
_ => continue ,
194
195
}
195
196
}
You can’t perform that action at this time.
0 commit comments