summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-08-25 17:35:46 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2016-08-25 17:35:46 -0700
commitb2e6a299dd58a640569aa6cdfe9774f7059bb096 (patch)
treeb897c3c75dc50906100c448385abdab8f091ab8b
parent4dd1691355fe645c7189dbf7398e85594af86af0 (diff)
downloadldid-b2e6a299dd58a640569aa6cdfe9774f7059bb096.tar.gz
ldid-b2e6a299dd58a640569aa6cdfe9774f7059bb096.tar.zst
ldid-b2e6a299dd58a640569aa6cdfe9774f7059bb096.zip
Apparently, I never pushed this fix to ldid -s :/.
-rw-r--r--ldid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldid.cpp b/ldid.cpp
index b3e4beb..3011711 100644
--- 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);