]> git.saurik.com Git - apple/dyld.git/commitdiff
dyld-360.21.tar.gz os-x-10114 v360.21
authorApple <opensource@apple.com>
Wed, 13 Jul 2016 22:45:12 +0000 (22:45 +0000)
committerApple <opensource@apple.com>
Wed, 13 Jul 2016 22:45:12 +0000 (22:45 +0000)
src/dyld.cpp

index ef45c272a33a66b7459568e4f72eda298c08d134..39f254c404529b852118787aa29c075246038f03 100644 (file)
@@ -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: