diff --git a/gutenprint-device-ids.patch b/gutenprint-device-ids.patch
index 58a557b..ca15524 100644
--- a/gutenprint-device-ids.patch
+++ b/gutenprint-device-ids.patch
@@ -1,6 +1,29 @@
diff -up gutenprint-5.2.6/src/xml/printers.xml.device-ids gutenprint-5.2.6/src/xml/printers.xml
---- gutenprint-5.2.6/src/xml/printers.xml.device-ids 2010-08-11 16:15:29.000000000 +0200
-+++ gutenprint-5.2.6/src/xml/printers.xml 2010-08-11 16:19:22.000000000 +0200
+--- gutenprint-5.2.6/src/xml/printers.xml.device-ids 2010-12-02 18:40:53.000000000 +0100
++++ gutenprint-5.2.6/src/xml/printers.xml 2010-12-02 18:50:23.000000000 +0100
+@@ -127,11 +127,11 @@
+
+
+
+-
++
+
+
+
+-
++
+
+
+
+@@ -265,7 +265,7 @@
+
+
+
+-
++
+
+
+
@@ -311,7 +311,7 @@
@@ -10,7 +33,12 @@ diff -up gutenprint-5.2.6/src/xml/printers.xml.device-ids gutenprint-5.2.6/src/x
-@@ -327,7 +327,7 @@
+@@ -323,11 +323,11 @@
+
+
+
+-
++
@@ -37,6 +65,27 @@ diff -up gutenprint-5.2.6/src/xml/printers.xml.device-ids gutenprint-5.2.6/src/x
+@@ -705,7 +705,7 @@
+
+
+
+-
++
+
+
+
+@@ -838,9 +838,9 @@
+
+
+
+-
++
+
+-
++
+
+
+
@@ -925,7 +925,7 @@
@@ -46,3 +95,47 @@ diff -up gutenprint-5.2.6/src/xml/printers.xml.device-ids gutenprint-5.2.6/src/x
+@@ -1010,19 +1010,19 @@
+
+
+
+-
+-
++
++
+
+
+
+
+
+-
++
+
+-
++
+
+
+-
++
+
+
+
+@@ -1030,15 +1030,15 @@
+
+
+
+-
+-
++
++
+
+
+
+
+
+
+-
++
+
+
+
diff --git a/gutenprint-null-pointer.patch b/gutenprint-null-pointer.patch
new file mode 100644
index 0000000..a455d6b
--- /dev/null
+++ b/gutenprint-null-pointer.patch
@@ -0,0 +1,30 @@
+diff -up gutenprint-5.2.6/src/escputil/escputil.c.null-pointer gutenprint-5.2.6/src/escputil/escputil.c
+--- gutenprint-5.2.6/src/escputil/escputil.c.null-pointer 2009-12-23 21:13:54.000000000 +0100
++++ gutenprint-5.2.6/src/escputil/escputil.c 2010-12-02 13:05:58.000000000 +0100
+@@ -1313,10 +1313,8 @@ do_new_status(status_cmd_t cmd, char *bu
+ const char *ind;
+ const stp_string_list_t *color_list = NULL;
+ stp_parameter_t desc;
+- const stp_vars_t *printvars = stp_printer_get_defaults(printer);
+- stp_describe_parameter(printvars, "ChannelNames", &desc);
+- if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
+- color_list = desc.bounds.str;
++ const stp_vars_t *printvars = NULL;
++
+ STP_DEBUG(fprintf(stderr, "New format bytes: %d bytes\n", bytes));
+ if (cmd == CMD_STATUS)
+ printf(_("Printer Name: %s\n"),
+@@ -1373,6 +1371,13 @@ do_new_status(status_cmd_t cmd, char *bu
+ for (j = 0; j < total_param_count; j++)
+ {
+ param = (unsigned) buf[i + j + 2];
++ if (printer)
++ {
++ printvars = stp_printer_get_defaults(printer);
++ stp_describe_parameter(printvars, "ChannelNames", &desc);
++ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
++ color_list = desc.bounds.str;
++ }
+ print_warning(param, color_list);
+ }
+ break;
diff --git a/gutenprint.spec b/gutenprint.spec
index 9bc9714..da20c21 100644
--- a/gutenprint.spec
+++ b/gutenprint.spec
@@ -4,7 +4,7 @@
Name: gutenprint
Summary: Printer Drivers Package
Version: 5.2.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: System Environment/Base
URL: http://gimp-print.sourceforge.net/
Source0: http://dl.sf.net/gimp-print/gutenprint-5.2/%{version}/gutenprint-%{version}.tar.bz2
@@ -18,6 +18,7 @@ Patch2: gutenprint-selinux.patch
Patch3: gutenprint-brother-hl-2040.patch
Patch4: gutenprint-postscriptdriver.patch
Patch5: gutenprint-device-ids.patch
+Patch6: gutenprint-null-pointer.patch
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cups-libs >= 1.1.22-0.rc1.9.10, cups >= 1.1.22-0.rc1.9.10
@@ -161,7 +162,16 @@ Epson, HP and compatible printers.
# Epson Stylus Photo 1400 (bug #577299).
# Epson Stylus Photo 830U (bug #577307).
# HP DeskJet 959C (bug #577291).
+# Canon PIXMA iP4200 (bug #626365).
+# Canon PIXMA iP3000 (bug #652179).
+# Epson Stylus Color 680 (bug #652228).
+# Epson Stylus Photo 1270 (bug #638537).
+# HP LaserJet 4050/4100/4350/5100/8000/M3027 MFP/M3035 MFP/P3005 (bug #659043).
+# HP Color LaserJet 2500/4550 (bug #659044).
+# Brother hl-2035 (bug #651603#c3)
%patch5 -p1 -b .device-ids
+# Avoid null pointer access in escputil (bug #659120).
+%patch6 -p1 -b .null-pointer
cp %{SOURCE2} src/cups/cups-genppdupdate.in
@@ -291,6 +301,17 @@ fi
/bin/rm -f /var/cache/foomatic/*
%changelog
+* Thu Dec 02 2010 Jiri Popelka 5.2.6-3
+- Added IEEE 1284 Device ID for:
+ Canon PIXMA iP4200 (bug #626365).
+ Canon PIXMA iP3000 (bug #652179).
+ Epson Stylus Color 680 (bug #652228).
+ Epson Stylus Photo 1270 (bug #638537).
+ HP LaserJet 4050/4100/4350/5100/8000/M3027 MFP/M3035 MFP/P3005 (bug #659043).
+ HP Color LaserJet 2500/4550 (bug #659044).
+ Brother hl-2035 (bug #651603#c3).
+- Avoid null pointer access in escputil (bug #659120).
+
* Fri Nov 26 2010 Tim Waugh 5.2.6-2
- The pycups requirement is now python-cups.