]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_codesigning/lib/machorep.cpp
Security-55471.14.4.tar.gz
[apple/security.git] / libsecurity_codesigning / lib / machorep.cpp
index ac735edff384d2185f10dc3b61cecf799b3fee8c..b3ed84372777abaadc95d3d45a61ffac70b4e690 100644 (file)
@@ -47,7 +47,7 @@ MachORep::MachORep(const char *path, const Context *ctx)
 {
        if (ctx)
                if (ctx->offset)
-                       mExecutable = new Universal(fd(), ctx->offset);
+                       mExecutable = new Universal(fd(), (size_t)ctx->offset);
                else if (ctx->arch) {
                        auto_ptr<Universal> full(new Universal(fd()));
                        mExecutable = new Universal(fd(), full->archOffset(ctx->arch));
@@ -204,7 +204,7 @@ CFDataRef MachORep::infoPlist()
                if (const section *sect = macho->findSection("__TEXT", "__info_plist")) {
                        if (macho->is64()) {
                                const section_64 *sect64 = reinterpret_cast<const section_64 *>(sect);
-                               info.take(macho->dataAt(macho->flip(sect64->offset), macho->flip(sect64->size)));
+                               info.take(macho->dataAt(macho->flip(sect64->offset), (size_t)macho->flip(sect64->size)));
                        } else {
                                info.take(macho->dataAt(macho->flip(sect->offset), macho->flip(sect->size)));
                        }