]> git.saurik.com Git - apple/dyld.git/blobdiff - src/ImageLoader.cpp
dyld-46.12.tar.gz
[apple/dyld.git] / src / ImageLoader.cpp
index f3d770edf5f0c8388d074eabe0834f42a2459859..246137421b82b0269f5cf78b38e03e1990e1a59a 100644 (file)
@@ -506,6 +506,7 @@ void ImageLoader::recursiveLoadLibraries(const LinkContext& context)
                                        const char* referencedFrom = this->getPath();
                                        char buf[strlen(requiredLib.name)+strlen(referencedFrom)+strlen(formatString)+strlen(msg)+2];
                                        sprintf(buf, formatString, requiredLib.name, referencedFrom, msg);
+                                       fLibrariesLoaded = false;
                                        throw strdup(buf);  // this is a leak if exception doesn't halt program
                                }
                                // ok if weak library not found
@@ -842,7 +843,7 @@ uint64_t ImageLoader::copyAndMap(const char* tempFile, uint8_t** fileToPrebind,
        struct statfs statfs_buf;
        if ( fstatfs(dst, &statfs_buf) != 0 )
                throwf("can't fstatfs(), errno=%d for %s", errno, tempFile);
-       uint64_t freespace = statfs_buf.f_bavail * statfs_buf.f_bsize;
+       uint64_t freespace = (uint64_t)statfs_buf.f_bavail * (uint64_t)statfs_buf.f_bsize;
        
        // closing notes:  
        //              ok to close file after mapped in