CFRelease(debugStr);
#endif
- CSSM_ACL_AUTHORIZATION_TAG rights[numAcls];
+ CFIndex rightsSize = numAcls > 0 ? numAcls : 1;
+
+ CSSM_ACL_AUTHORIZATION_TAG rights[rightsSize];
memset(rights, 0, sizeof(rights));
for (CFIndex iCnt = 0; iCnt < numAcls; iCnt++)
{ CSSM_LIST_TYPE_UNKNOWN, &subject1, &subject2 },
false, // Delegate
// rights for this entry
- { (uint32)(sizeof(rights) / sizeof(rights[0])), rights },
+ { (uint32)numAcls, rights },
// rest is defaulted
}
}
if (!trustedAppsURL)
goto xit;
- if ( trustedAppListFileNameWithoutExtension )
- CFRelease(trustedAppListFileNameWithoutExtension);
-
if (!CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault,trustedAppsURL,&xmlDataRef,NULL,NULL,&errorCode))
goto xit;
trustedAppList = (CFArrayRef)trustedAppsPlist;
xit:
+ CFReleaseNull(trustedAppListFileNameWithoutExtension);
if (bundleURL)
CFRelease(bundleURL);
if (secBundle)