rpms/gnome-power-manager/devel gnome-power-manager-2.15.91-double-free.patch, NONE, 1.1 gnome-power-manager.spec, 1.58, 1.59

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 15 05:21:01 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/gnome-power-manager/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv7512

Modified Files:
	gnome-power-manager.spec 
Added Files:
	gnome-power-manager-2.15.91-double-free.patch 
Log Message:
fix a double free


gnome-power-manager-2.15.91-double-free.patch:
 gpm-manager.c |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

--- NEW FILE gnome-power-manager-2.15.91-double-free.patch ---
Index: src/gpm-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-power-manager/src/gpm-manager.c,v
retrieving revision 1.170
diff -p -u -r1.170 gpm-manager.c
--- src/gpm-manager.c	7 Aug 2006 19:55:15 -0000	1.170
+++ src/gpm-manager.c	8 Aug 2006 14:35:35 -0000
@@ -2584,24 +2584,29 @@ screensaver_auth_request_cb (GpmScreensa
 			     gboolean        auth,
 			     GpmManager     *manager)
 {
-	GError *error;
+	GError  *error;
+	gboolean res;
+
+	/* Only act on the begin authentication request */
+	if (! auth) {
+		return;
+	}
 
 	/* TODO: This may be a bid of a bodge, as we will have multiple
 		 resume requests -- maybe this need a logic cleanup */
-	if (auth) {
-		if (gpm_brightness_has_hardware (manager->priv->brightness)) {
-			gpm_debug ("undimming lcd due to auth begin");
-			gpm_brightness_undim (manager->priv->brightness);
-		}
+	if (gpm_brightness_has_hardware (manager->priv->brightness)) {
+		gpm_debug ("undimming lcd due to auth begin");
+		gpm_brightness_undim (manager->priv->brightness);
+	}
 
-		/* We turn on the monitor unconditionally, as we may be using
-		 * a smartcard to authenticate and DPMS might still be on.
-		 * See #350291 for more details */
-		gpm_dpms_set_mode (manager->priv->dpms, GPM_DPMS_MODE_ON, &error);
-		if (error) {
-			gpm_warning ("Failed to turn on DPMS: %s", error->message);
-			g_error_free (error);
-		}
+	/* We turn on the monitor unconditionally, as we may be using
+	 * a smartcard to authenticate and DPMS might still be on.
+	 * See #350291 for more details */
+	error = NULL;
+	res = gpm_dpms_set_mode (manager->priv->dpms, GPM_DPMS_MODE_ON, &error);
+	if (! res) {
+		gpm_warning ("Failed to turn on DPMS: %s", error->message);
+		g_error_free (error);
 	}
 }
 


Index: gnome-power-manager.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-power-manager/devel/gnome-power-manager.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- gnome-power-manager.spec	13 Aug 2006 22:11:14 -0000	1.58
+++ gnome-power-manager.spec	15 Aug 2006 05:20:58 -0000	1.59
@@ -10,6 +10,8 @@
 Group: Applications/System
 Source: gnome-power-manager-%{version}.tar.bz2
 Patch0: gnome-power-manager-2.15.4-nodefaultbeep.patch
+# fixed in cvs
+Patch1: gnome-power-manager-2.15.91-double-free.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 URL: http://gnome-power.sourceforge.net/
 BuildPrereq: libgnomeui-devel
@@ -42,6 +44,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .nodefaultbeep
+%patch1 -p0 -b .double-free
 
 %build
 %configure \
@@ -109,6 +112,9 @@
 %{_datadir}/icons/hicolor/*/apps/*
 
 %changelog
+* Tue Aug 15 2006 Matthias Clasen <mclasen at redhat.com> - 2.15.91-2.fc6
+- Fix a double free in the smartcart code
+
 * Sun Aug 13 2006 Matthias Clasen <mclasen at redhat.com> - 2.15.91-1.fc6
 - Update to 2.15.91
 




More information about the fedora-cvs-commits mailing list