File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ thread_local!(
2525fn main ( data : & [ u8 ] , _meta : Option < & [ u8 ] > ) -> Result < Dex , ModuleError > {
2626 CHECKSUM_CACHE . with ( |cache| * cache. borrow_mut ( ) = None ) ;
2727 SIGNATURE_CACHE . with ( |cache| * cache. borrow_mut ( ) = None ) ;
28+
2829 match parser:: Dex :: parse ( data) {
2930 Ok ( dex) => Ok ( dex. into ( ) ) ,
3031 Err ( _) => {
@@ -137,7 +138,7 @@ fn contains_method(
137138 Err ( _) => return None ,
138139 } ;
139140
140- Some ( dex. methods . binary_search_by ( |item| item. name . cmp ( & str ) ) . is_ok ( ) )
141+ Some ( dex. methods . iter ( ) . any ( |item| item. name . as_deref ( ) == str . as_deref ( ) ) )
141142}
142143
143144/// Function that checks whether the DEX file contains the specified class
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ fn methods() {
9191 import "dex"
9292 rule test {
9393 condition:
94- dex.contains_method("getPackageName")
94+ dex.contains_method("getPackageName") and
95+ dex.contains_method("loadLibrary")
9596 }
9697 "# ,
9798 & dex
You can’t perform that action at this time.
0 commit comments