]> git.saurik.com Git - cycript.git/commitdiff
Corrupt load command should break for, not return.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Jul 2014 12:58:10 +0000 (05:58 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Jul 2014 12:58:10 +0000 (05:58 -0700)
Trampoline.t.cpp

index 4ebf8200d2f587007ded3df6faf796364cc22e6e..ab821e88d013d1b0c00aa69c7371129eb8fc28a4 100644 (file)
@@ -108,11 +108,11 @@ static const uint32_t MH_MAGIC_XX = MH_MAGIC;
                     lcp->cmdsize % sizeof(long) != 0 || lcp->cmdsize <= 0 || \
                     reinterpret_cast<const uint8_t *>(lcp) + lcp->cmdsize > reinterpret_cast<const uint8_t *>(load_commands) + mach->sizeofcmds \
                 ) \
-                    return NULL; \
+                    break; \
                 else if (lcp->cmd != lc) \
                     continue; \
                 else if (lcp->cmdsize < sizeof(type)) \
-                    return NULL; \
+                    break; \
                 else if (const type *command = reinterpret_cast<const type *>(lcp))
 
 static const mach_header_xx *Library(struct dyld_all_image_infos *infos, const char *name) {