summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-10-01 22:21:05 -1000
committerSam Bingner <sam@bingner.com>2018-10-01 22:21:05 -1000
commit73e9f4a7420ccaf166b2b5f46a52316d0bea9e3c (patch)
tree42cb9ad2d297d1a80f3c81b01f26b003a5feb97f
parentae2e967c43880fbd1b7e7f130541e9dbbca0debf (diff)
Stop crashing when searching for a string longer than the name of a packagev1.1.32%b1
-rw-r--r--MobileCydia.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 1efa9af..d9b1d83 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;