From: Apple Date: Wed, 13 Jul 2016 22:45:12 +0000 (+0000) Subject: dyld-360.21.tar.gz X-Git-Tag: os-x-10114^0 X-Git-Url: https://git.saurik.com/apple/dyld.git/commitdiff_plain/5f39f99244da210e6860ddd9fdd67baa46f62504?ds=inline dyld-360.21.tar.gz --- 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: