mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Fixed potential crasher in code signing in the case that the host application is not code signed.
This commit is contained in:
1 parent
a59e8ff958
commit
3d8be2d2da
1 file changed
+3
-3
@@ -26,10 +26,11 @@ extern OSStatus SecStaticCodeCheckValidityWithErrors(SecStaticCodeRef staticCode
|
||||
// This API didn't exist prior to 10.6.
|
||||
if (SecCodeCopySelf == NULL) return NO;
|
||||
|
||||
SecRequirementRef requirement = NULL;
|
||||
OSStatus result;
|
||||
|
||||
SecRequirementRef requirement = NULL;
|
||||
SecStaticCodeRef staticCode = NULL;
|
||||
SecCodeRef hostCode = NULL;
|
||||
|
||||
result = SecCodeCopySelf(kSecCSDefaultFlags, &hostCode);
|
||||
if (result != 0) {
|
||||
SULog(@"Failed to copy host code %d", result);
|
||||
@@ -42,7 +43,6 @@ extern OSStatus SecStaticCodeCheckValidityWithErrors(SecStaticCodeRef staticCode
|
||||
goto finally;
|
||||
}
|
||||
|
||||
SecStaticCodeRef staticCode = NULL;
|
||||
NSBundle *newBundle = [NSBundle bundleWithPath:destinationPath];
|
||||
if (!newBundle) {
|
||||
SULog(@"Failed to load NSBundle for update");
|
||||
|
||||
Reference in new issue
Block a user