diff options
author | Miloslav Trmač <mitr@redhat.com> | 2014-07-01 20:00:48 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2015-06-18 22:20:53 +0200 |
commit | 983e8ec37b0ec1cc5114cb9ca49cf558dedfb31e (patch) | |
tree | 62ee32f706d4b9b9276a86dbeddfccd43f94b304 /src | |
parent | fb5076b7c05d01a532d593a4079a29cf2d63a228 (diff) | |
download | polkit-983e8ec37b0ec1cc5114cb9ca49cf558dedfb31e.tar.gz |
Don't pass an uninitialized JS parameter
Don't pass argc==3 when using a 2-member array in
polkit_backend_js_authority_check_authorization_sync . To avoid such
problems in the future, use G_N_ELEMENTS in both similar callers.
https://bugs.freedesktop.org/show_bug.cgi?id=69501
Diffstat (limited to 'src')
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c index c232573..c7a29e0 100644 --- a/src/polkitbackend/polkitbackendjsauthority.c +++ b/src/polkitbackend/polkitbackendjsauthority.c @@ -1074,7 +1074,7 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA if (!call_js_function_with_runaway_killer (authority, "_runAdminRules", - 2, + G_N_ELEMENTS (argv), argv, &rval)) { @@ -1179,7 +1179,7 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu if (!call_js_function_with_runaway_killer (authority, "_runRules", - 3, + G_N_ELEMENTS (argv), argv, &rval)) { |