]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_cdsa_utilities/lib/cssmaclpod.cpp
Security-55471.14.8.tar.gz
[apple/security.git] / libsecurity_cdsa_utilities / lib / cssmaclpod.cpp
index def26ab1628bc9cc40db2ae48a3e98106b701179..e7144c43f6db919e82f3250dd5f7b80542e9d514 100644 (file)
@@ -55,7 +55,7 @@ AclAuthorizationSet::AclAuthorizationSet(AclAuthorization auth0, AclAuthorizatio
 //
 AuthorizationGroup::AuthorizationGroup(const AclAuthorizationSet &auths, Allocator &alloc)
 {
 //
 AuthorizationGroup::AuthorizationGroup(const AclAuthorizationSet &auths, Allocator &alloc)
 {
-       NumberOfAuthTags = auths.size();
+       NumberOfAuthTags = (uint32)auths.size();
        AuthTags = alloc.alloc<CSSM_ACL_AUTHORIZATION_TAG>(NumberOfAuthTags);
        copy(auths.begin(), auths.end(), AuthTags);     // happens to be sorted
 }
        AuthTags = alloc.alloc<CSSM_ACL_AUTHORIZATION_TAG>(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) {
 AclOwnerPrototype *AutoAclOwnerPrototype::make()
 {
        if (!mAclOwnerPrototype) {
-               mAclOwnerPrototype = new AclOwnerPrototype; 
+               mAclOwnerPrototype = (AclOwnerPrototype*) mAllocator->malloc(sizeof(AclOwnerPrototype));
+        new (mAclOwnerPrototype) AclOwnerPrototype;
                mAclOwnerPrototype->clearPod();
        }
        return mAclOwnerPrototype;
                mAclOwnerPrototype->clearPod();
        }
        return mAclOwnerPrototype;