rpms/hplip/F-10 hplip-segfault.patch, NONE, 1.1 hplip.spec, 1.193, 1.194

Tim Waugh twaugh at fedoraproject.org
Tue Jan 13 15:21:01 UTC 2009


Author: twaugh

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

Modified Files:
	hplip.spec 
Added Files:
	hplip-segfault.patch 
Log Message:
* Tue Jan 13 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-4
- Prevent crash when DEVICE_URI/PRINTER environment variables are not
  set (bug #479808 comment 6).


hplip-segfault.patch:

--- NEW FILE hplip-segfault.patch ---
diff -up hplip-2.8.12/prnt/hpijs/hpijs.cpp.segfault hplip-2.8.12/prnt/hpijs/hpijs.cpp
--- hplip-2.8.12/prnt/hpijs/hpijs.cpp.segfault	2009-01-13 15:11:55.000000000 +0000
+++ hplip-2.8.12/prnt/hpijs/hpijs.cpp	2009-01-13 15:13:49.000000000 +0000
@@ -231,8 +231,14 @@ int hpijs_set_cb (void *set_cb_data, Ijs
 		// call dbus here
 		const char    *user_name = " ";
 		const char    *title     = " ";
+		char *device_uri = getenv ("DEVICE_URI");
+		char *printer = getenv("PRINTER");
 		int     job_id = 0;
-                SendDbusMessage (getenv ("DEVICE_URI"), getenv("PRINTER"),
+		if (!device_uri)
+		    device_uri = "";
+		if (!printer)
+		    printer = "";
+                SendDbusMessage (device_uri, printer,
 	     	                 EVENT_PRINT_FAILED_MISSING_PLUGIN,
 				 user_name, job_id, title);
                 bug("unable to set device=%s, err=%d\n", svalue, r);


Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip.spec,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -r1.193 -r1.194
--- hplip.spec	13 Jan 2009 13:18:29 -0000	1.193
+++ hplip.spec	13 Jan 2009 15:20:31 -0000	1.194
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 2.8.12
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -15,6 +15,7 @@
 Source0: http://kent.dl.sourceforge.net/sourceforge/hplip/%{name}-%{version}.tar.gz
 Source1: hplip.fdi
 Patch1: hplip-desktop.patch
+Patch2: hplip-segfault.patch
 Patch4: hplip-marker-supply.patch
 Patch5: hplip-dbus.patch
 Patch6: hplip-systray.patch
@@ -104,6 +105,10 @@
 # Fix desktop file.
 %patch1 -p1 -b .desktop
 
+# Prevent crash when DEVICE_URI/PRINTER environment variables are not
+# set (bug #479808 comment 6).
+%patch2 -p1 -b .segfault
+
 # Low ink is a warning condition, not an error.
 %patch4 -p1 -b .marker-supply
 
@@ -317,6 +322,10 @@
 exit 0
 
 %changelog
+* Tue Jan 13 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-4
+- Prevent crash when DEVICE_URI/PRINTER environment variables are not
+  set (bug #479808 comment 6).
+
 * Tue Jan 13 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-3
 - Make --qt4 the default for the systray applet, so that it appears
   in the right place, again (bug #479751).




More information about the fedora-extras-commits mailing list