mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
Safer initialization
This commit is contained in:
1 parent
9f23c4f11e
commit
7b9e1fb431
1 file changed
+5
-5
Vendored
+5
-5
@@ -55,11 +55,11 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
const char* executableFileSystemRepresentation = [executablePath fileSystemRepresentation];
|
||||
|
||||
// Prepare a right allowing script to execute with privileges
|
||||
AuthorizationItem right;
|
||||
memset(&right,0,sizeof(right));
|
||||
right.name = kAuthorizationRightExecute;
|
||||
right.value = (void*) executableFileSystemRepresentation;
|
||||
right.valueLength = strlen(executableFileSystemRepresentation);
|
||||
AuthorizationItem right = {
|
||||
.name = kAuthorizationRightExecute,
|
||||
.value = (char*)executableFileSystemRepresentation,
|
||||
.valueLength = strlen(executableFileSystemRepresentation),
|
||||
};
|
||||
|
||||
// Package up the single right
|
||||
AuthorizationRights rights;
|
||||
|
||||
Reference in new issue
Block a user