]> git.saurik.com Git - ldid.git/commitdiff
Apparently, I never pushed this fix to ldid -s :/.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 26 Aug 2016 00:35:46 +0000 (17:35 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 26 Aug 2016 00:35:46 +0000 (17:35 -0700)
ldid.cpp

index b3e4beb1c89244a83da643fc6dfa8c07f1eccdca..301171135d7a9992d904ff120bdeafdfc705fba1 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -2414,7 +2414,7 @@ int main(int argc, char *argv[]) {
                 for (size_t index(0); index != Swap(super->count); ++index)
                     if (Swap(super->index[index].type) == CSSLOT_CODEDIRECTORY) {
                         uint32_t begin = Swap(super->index[index].offset);
-                        struct CodeDirectory *directory = reinterpret_cast<struct CodeDirectory *>(blob + begin);
+                        struct CodeDirectory *directory = reinterpret_cast<struct CodeDirectory *>(blob + begin + sizeof(Blob));
 
                         uint8_t (*hashes)[LDID_SHA1_DIGEST_LENGTH] = reinterpret_cast<uint8_t (*)[LDID_SHA1_DIGEST_LENGTH]>(blob + begin + Swap(directory->hashOffset));
                         uint32_t pages = Swap(directory->nCodeSlots);