From 5f39f99244da210e6860ddd9fdd67baa46f62504 Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 13 Jul 2016 22:45:12 +0000 Subject: [PATCH] dyld-360.21.tar.gz --- src/dyld.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dyld.cpp b/src/dyld.cpp index ef45c27..39f254c 100644 --- a/src/dyld.cpp +++ b/src/dyld.cpp @@ -4413,7 +4413,10 @@ static void loadInsertedDylib(const char* path) #if TARGET_IPHONE_SIMULATOR dyld::log("dyld: warning: could not load inserted library '%s' because %s\n", path, msg); #else - halt(dyld::mkstringf("could not load inserted library '%s' because %s\n", path, msg)); + if ( sProcessRequiresLibraryValidation ) + dyld::log("dyld: warning: could not load inserted library '%s' into library validated process because %s\n", path, msg); + else + halt(dyld::mkstringf("could not load inserted library '%s' because %s\n", path, msg)); #endif } catch (...) { @@ -4651,6 +4654,8 @@ static uintptr_t useSimulatorDyld(int fd, const macho_header* mainExecutableMH, //dyld::log("dyld_sim %s mapped at %p\n", seg->segname, segAddress); if ( segAddress == (void*)(-1) ) return 0; + if ( ((uintptr_t)segAddress < loadAddress) || ((uintptr_t)segAddress+seg->filesize > loadAddress+mappingSize) ) + return 0; } break; case LC_CODE_SIGNATURE: -- 2.47.2