}
#endif
+ // XXX: this is just a "sufficiently large number"
+ size_t certificate(0x3000);
+
Allocate(idata, isize, output, fun([&](const MachHeader &mach_header, size_t size) -> size_t {
size_t alloc(sizeof(struct SuperBlob));
if (!key.empty()) {
alloc += sizeof(struct BlobIndex);
alloc += sizeof(struct Blob);
- // XXX: this is just a "sufficiently large number"
- alloc += 0x3000;
+ alloc += certificate;
}
_foreach (slot, slots)
std::string value(result);
put(data, value.data(), value.size());
- insert(blobs, CSSLOT_SIGNATURESLOT, CSMAGIC_BLOBWRAPPER, data);
+ const auto &save(insert(blobs, CSSLOT_SIGNATURESLOT, CSMAGIC_BLOBWRAPPER, data));
+ _assert(save.size() <= certificate);
}
#endif