mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-20 00:48:23 +00:00
This reverts commit a8d1fdb294.
Needed for elogind.
Bug: https://bugs.gentoo.org/923614
Bug: https://bugs.gentoo.org/934314
Signed-off-by: Sam James <sam@gentoo.org>
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
https://gitlab.freedesktop.org/polkit/polkit/-/commit/c79ee5595c8d397098978ad50eb521ba2ae8467d
|
|
|
|
From c79ee5595c8d397098978ad50eb521ba2ae8467d Mon Sep 17 00:00:00 2001
|
|
From: Vincent Mihalkovic <vmihalko@redhat.com>
|
|
Date: Wed, 16 Aug 2023 08:59:55 +0000
|
|
Subject: [PATCH] pkexec: fix uninitialized pointer warning
|
|
|
|
--- a/src/programs/pkexec.c
|
|
+++ b/src/programs/pkexec.c
|
|
@@ -53,6 +53,7 @@
|
|
static gchar *original_user_name = NULL;
|
|
static gchar *original_cwd;
|
|
static gchar *command_line = NULL;
|
|
+static gchar *cmdline_short = NULL;
|
|
static struct passwd *pw;
|
|
|
|
#ifndef HAVE_CLEARENV
|
|
@@ -508,6 +509,7 @@ main (int argc, char *argv[])
|
|
path = NULL;
|
|
exec_argv = NULL;
|
|
command_line = NULL;
|
|
+ cmdline_short = NULL;
|
|
opt_user = NULL;
|
|
local_agent_handle = NULL;
|
|
|
|
@@ -802,7 +804,6 @@ main (int argc, char *argv[])
|
|
polkit_details_insert (details, "program", path);
|
|
polkit_details_insert (details, "command_line", command_line);
|
|
|
|
- gchar *cmdline_short = NULL;
|
|
cmdline_short = g_strdup(command_line);
|
|
if (strlen(command_line) > 80)
|
|
g_stpcpy(g_stpcpy( cmdline_short + 38, " ... " ),
|
|
--
|
|
GitLab
|