X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/0be5d81c6abb58cc8b67e69601836a20d21891aa..2de2b37bffe2c6933059776506986e1e112036db:/src/ImageLoader.cpp diff --git a/src/ImageLoader.cpp b/src/ImageLoader.cpp index f3d770e..2461374 100644 --- a/src/ImageLoader.cpp +++ b/src/ImageLoader.cpp @@ -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