Skip to content

Commit

Permalink
Put the CodeDirectory blob in front
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Oct 21, 2023
1 parent e54bc64 commit 63fca80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/sideload/macho.d
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,11 @@ class EmbeddedSignature {
}
}

if (codeDirIndex != -1) {
blobs.swapAt(0, codeDirIndex);
blobsData.swapAt(0, codeDirIndex);
}

foreach (index, blobData; blobsData) {
blobIndexes[index] = BlobIndex(blobs[index].type.nativeToBigEndian(), offset.nativeToBigEndian());
offset += blobData.length;
Expand Down

0 comments on commit 63fca80

Please sign in to comment.