public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mate-extra/mate-sensors-applet/, mate-extra/mate-sensors-applet/files/
Date: Sun, 13 Jul 2025 06:47:39 +0000 (UTC)	[thread overview]
Message-ID: <1752389152.052b63d2d346d46c33052d126cdb46f4d93b4131.sam@gentoo> (raw)

commit:     052b63d2d346d46c33052d126cdb46f4d93b4131
Author:     Ian Jordan <immoloism <AT> gmail <DOT> com>
AuthorDate: Thu Jul 10 07:10:00 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul 13 06:45:52 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=052b63d2

mate-extra/mate-sensors-applet: Fix an invalid pointer crash

Fix an invalid pointer crash with glib 2.83.2
The typecast to non-const gchar produced invalid pointer errors on free() with glib 2.83.2

Not entirely sure why this wasn't included with 1.28.0 release, however as a Gentoo user has reported it resolves the issue for them and Fedora are using the same patch in https://bugzilla.redhat.com/show_bug.cgi?id=2326719 then I see no issue to cherrypick this before the 1.28.1 release.

Closes: https://bugs.gentoo.org/959761
Signed-off-by: Ian Jordan <immoloism <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42944
Closes: https://github.com/gentoo/gentoo/pull/42944
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...ate-sensors-applet-1.28.0-invalid-pointer.patch | 45 +++++++++++++++
 .../mate-sensors-applet-1.28.0-r1.ebuild           | 65 ++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/mate-extra/mate-sensors-applet/files/mate-sensors-applet-1.28.0-invalid-pointer.patch b/mate-extra/mate-sensors-applet/files/mate-sensors-applet-1.28.0-invalid-pointer.patch
new file mode 100644
index 000000000000..aebe84572e56
--- /dev/null
+++ b/mate-extra/mate-sensors-applet/files/mate-sensors-applet-1.28.0-invalid-pointer.patch
@@ -0,0 +1,45 @@
+From: https://github.com/mate-desktop/mate-sensors-applet/commit/9b74dc16d852a40d37f7ce6c236406959fd013e5
+From: lukefromdc <lukefromdc@hushmail.com>
+Date: Mon, 13 Jan 2025 22:39:13 -0500
+Subject: [PATCH] Fix an invalid pointer crash with glib 2.83.2
+
+The typecast to non-const gchar produced invalid pointer errors on free() with glib 2.83.2
+--- a/plugins/udisks2/udisks2-plugin.c
++++ b/plugins/udisks2/udisks2-plugin.c
+@@ -304,16 +304,15 @@ syslog(LOG_ERR, "propdict2 type: %s", g_variant_print(propdict2, TRUE));
+ #endif
+ 
+             /* get data */
+-            gchar *id = NULL;
+-            gchar *model = NULL;
++            const gchar *id = NULL;
++            const gchar *model = NULL;
+ 
+             gboolean smartenabled;
+             gdouble temp;
+ 
+-            /* NULL, bc we don't care about the length of the string
+-             * typecast bc g_variant_get_string() returns const char* */
+-            id = (gchar *) g_variant_get_string (g_variant_lookup_value (propdict, "Id", G_VARIANT_TYPE_STRING), NULL);
+-            model = (gchar *) g_variant_get_string (g_variant_lookup_value (propdict, "Model", G_VARIANT_TYPE_STRING), NULL);
++            /* NULL, bc we don't care about the length of the string*/
++            id = g_variant_get_string (g_variant_lookup_value (propdict, "Id", G_VARIANT_TYPE_STRING), NULL);
++            model = g_variant_get_string (g_variant_lookup_value (propdict, "Model", G_VARIANT_TYPE_STRING), NULL);
+ 
+             smartenabled = g_variant_get_boolean (g_variant_lookup_value (propdict2, "SmartEnabled", G_VARIANT_TYPE_BOOLEAN));
+             temp = g_variant_get_double (g_variant_lookup_value (propdict2, "SmartTemperature", G_VARIANT_TYPE_DOUBLE));
+@@ -366,14 +365,6 @@ syslog(LOG_ERR, "No temp data for device: %s\n", key);
+ 
+                 g_debug ("No temp data for device: %s\n", key);
+             }
+-
+-#ifdef UD2PD
+-syslog(LOG_ERR, "b4 free1");
+-#endif
+-
+-            g_free (id);
+-            g_free (model);
+-
+         }
+ 
+ #ifdef UD2PD

diff --git a/mate-extra/mate-sensors-applet/mate-sensors-applet-1.28.0-r1.ebuild b/mate-extra/mate-sensors-applet/mate-sensors-applet-1.28.0-r1.ebuild
new file mode 100644
index 000000000000..225c5ad305ab
--- /dev/null
+++ b/mate-extra/mate-sensors-applet/mate-sensors-applet-1.28.0-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MATE_LA_PUNT="yes"
+
+inherit mate
+
+MINOR=$(($(ver_cut 2) % 2))
+if [[ ${MINOR} -eq 0 ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86"
+fi
+
+DESCRIPTION="MATE panel applet to display readings from hardware sensors"
+LICENSE="FDL-1.1+ GPL-2+"
+SLOT="0"
+
+IUSE="+dbus hddtemp libnotify lm-sensors video_cards_nvidia"
+
+COMMON_DEPEND="
+	>=dev-libs/glib-2.50:2
+	>=mate-base/mate-panel-1.28.0
+	>=x11-libs/cairo-1.0.4
+	x11-libs/gdk-pixbuf:2
+	>=x11-libs/gtk+-3.22:3
+	hddtemp? ( >=app-admin/hddtemp-0.3_beta13 )
+	libnotify? ( >=x11-libs/libnotify-0.7 )
+	lm-sensors? ( sys-apps/lm-sensors )
+	video_cards_nvidia? ( >=x11-drivers/nvidia-drivers-100.14.09:0[static-libs,tools] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+	virtual/libintl
+"
+
+BDEPEND="${COMMON_DEPEND}
+	app-text/rarian
+	app-text/yelp-tools
+	>=sys-devel/gettext-0.19.8
+	virtual/pkgconfig
+"
+
+PDEPEND="hddtemp? ( dbus? ( sys-fs/udisks:2 ) )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.28.0-invalid-pointer.patch #959761
+)
+
+src_configure() {
+	local udisks
+
+	if use hddtemp && use dbus; then
+		udisks="--enable-udisks2"
+	else
+		udisks="--disable-udisks2"
+	fi
+
+	mate_src_configure \
+		--disable-netbsd \
+		$(use_enable libnotify) \
+		$(use_with lm-sensors libsensors) \
+		$(use_with video_cards_nvidia nvidia) \
+		${udisks}
+}


             reply	other threads:[~2025-07-13  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-13  6:47 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-09 17:51 [gentoo-commits] repo/gentoo:master commit in: mate-extra/mate-sensors-applet/, mate-extra/mate-sensors-applet/files/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1752389152.052b63d2d346d46c33052d126cdb46f4d93b4131.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox