summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2020-08-20 10:05:08 -1000
committerSam Bingner <sam@bingner.com>2020-08-20 10:05:08 -1000
commitf280d3d5149b57ae58e35feb18351ed62a8fa7ec (patch)
treead7bc25896e4d33db8f91646ae58e1362f2f280e
parent9c241aacaebc8242a1c0b56cc3ae502de7f62bc9 (diff)
Don't crash on null dylib paths
-rw-r--r--Tweak.xm1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tweak.xm b/Tweak.xm
index 77f7fd7..19d82b1 100644
--- a/Tweak.xm
+++ b/Tweak.xm
@@ -442,6 +442,7 @@ MSHook(void *, dlopen, const char *path, int mode) {
// we probably don't need this whitelist, but it has the nifty benefit of letting Cycript inject
// that said, older versions of iOS (before 3.1) will need a special case due to now shared cache
+ if (path==NULL || (mode&RTLD_NOLOAD)==RTLD_NOLOAD) goto load;
for (const char **dylib = dylibs_; *dylib != NULL; ++dylib) {
size_t length(strlen(*dylib));
if (strncmp(path, *dylib, length) != 0)