X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195..e3d3b979fd185d8303f28a937baa53a187fb8c7d:/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp?ds=sidebyside diff --git a/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp b/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp index def26ab1..e7144c43 100644 --- a/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp +++ b/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp @@ -55,7 +55,7 @@ AclAuthorizationSet::AclAuthorizationSet(AclAuthorization auth0, AclAuthorizatio // AuthorizationGroup::AuthorizationGroup(const AclAuthorizationSet &auths, Allocator &alloc) { - NumberOfAuthTags = auths.size(); + NumberOfAuthTags = (uint32)auths.size(); AuthTags = alloc.alloc(NumberOfAuthTags); copy(auths.begin(), auths.end(), AuthTags); // happens to be sorted } @@ -112,7 +112,8 @@ void AclEntryPrototype::tag(const string &tagString) AclOwnerPrototype *AutoAclOwnerPrototype::make() { if (!mAclOwnerPrototype) { - mAclOwnerPrototype = new AclOwnerPrototype; + mAclOwnerPrototype = (AclOwnerPrototype*) mAllocator->malloc(sizeof(AclOwnerPrototype)); + new (mAclOwnerPrototype) AclOwnerPrototype; mAclOwnerPrototype->clearPod(); } return mAclOwnerPrototype;