rpms/hplip/F-10 hplip-dbus.patch,1.1,1.2 hplip.spec,1.197,1.198

Tim Waugh twaugh at fedoraproject.org
Wed Apr 22 13:35:10 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30291

Modified Files:
	hplip-dbus.patch hplip.spec 
Log Message:
* Wed Apr 22 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-8
- Fixed NULL pointer dereferences in hp backend's device_event()
  function.


hplip-dbus.patch:

Index: hplip-dbus.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip-dbus.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hplip-dbus.patch	11 Dec 2008 11:12:39 -0000	1.1
+++ hplip-dbus.patch	22 Apr 2009 13:35:08 -0000	1.2
@@ -1,13 +1,31 @@
-diff -up hplip-2.8.7/prnt/backend/hp.c.dbus hplip-2.8.7/prnt/backend/hp.c
---- hplip-2.8.7/prnt/backend/hp.c.dbus	2008-12-11 10:44:30.000000000 +0000
-+++ hplip-2.8.7/prnt/backend/hp.c	2008-12-11 10:46:15.000000000 +0000
-@@ -489,6 +489,9 @@ static int device_event(const char *dev,
+diff -up hplip-2.8.12/prnt/backend/hp.c.dbus hplip-2.8.12/prnt/backend/hp.c
+--- hplip-2.8.12/prnt/backend/hp.c.dbus	2008-12-17 20:39:37.000000000 +0000
++++ hplip-2.8.12/prnt/backend/hp.c	2009-04-22 14:25:38.000000000 +0100
+@@ -488,8 +488,18 @@ static int device_event(const char *dev,
+     const char *username, const char *jobid, const char *title)
+ {
      DBusMessage * msg = NULL;
-     int id = atoi(jobid);
+-    int id = atoi(jobid);
++    int id;
  
 +    if (dbus_conn == NULL)
 +	return 0;
 +
++    if (!dev || !printer || !jobid || !username || !title)
++    {
++	BUG("NULL argument given to device_event()\n");
++	return 0;
++    }
++
++    id = atoi(jobid);
      msg = dbus_message_new_signal(DBUS_PATH, DBUS_INTERFACE, "Event");
  
      if (NULL == msg)
+@@ -510,6 +520,7 @@ static int device_event(const char *dev,
+     if (!dbus_connection_send(dbus_conn, msg, NULL))
+     {
+         BUG("dbus message send failed!\n");
++	dbus_message_unref(msg);
+         return 0;
+     }
+ 


Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip.spec,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -r1.197 -r1.198
--- hplip.spec	16 Mar 2009 12:32:59 -0000	1.197
+++ hplip.spec	22 Apr 2009 13:35:08 -0000	1.198
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 2.8.12
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -332,6 +332,10 @@
 exit 0
 
 %changelog
+* Wed Apr 22 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-8
+- Fixed NULL pointer dereferences in hp backend's device_event()
+  function.
+
 * Mon Mar 16 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-7
 - Backported fix for PPD matching logic from 3.9.2 (bug #490360).
 




More information about the fedora-extras-commits mailing list