diff options
author | Sam Bingner <sam@bingner.com> | 2018-10-01 22:21:05 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-05-27 14:24:09 -1000 |
commit | 5cc349c4c82399eabb8fb3515531592e35d99d4f (patch) | |
tree | 3815afe5dc888fc01f5d1ae6572c456ae4c640aa /MobileCydia.mm | |
parent | 014888d50dcedd8f2a7bcac53bc0ffc1fbb6555f (diff) |
Stop crashing when searching for a string longer than the name of a package
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 9237251..94861ef 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7052,6 +7052,8 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi return false; if (![package unfiltered]) return false; + if ([query length] > [[package name] length]) + return false; if ([[package name] compare:query options:MatchCompareOptions_ range:NSMakeRange(0, [query length])] != NSOrderedSame) return false; return true; |