From 983e8ec37b0ec1cc5114cb9ca49cf558dedfb31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Tue, 1 Jul 2014 20:00:48 +0200 Subject: 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 --- src/polkitbackend/polkitbackendjsauthority.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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)) { -- cgit v1.2.1