Avoid null pointer access in escputil (bug #659120).
This commit is contained in:
parent
012811a757
commit
97a7552103
30
gutenprint-null-pointer.patch
Normal file
30
gutenprint-null-pointer.patch
Normal file
@ -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;
|
@ -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
|
||||
@ -169,6 +170,8 @@ Epson, HP and compatible printers.
|
||||
# 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
|
||||
|
||||
@ -307,6 +310,7 @@ fi
|
||||
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).
|
||||
|
||||
* Wed Aug 11 2010 Jiri Popelka <jpopelka@redhat.com> 5.2.6-1
|
||||
- 5.2.6.
|
||||
|
Loading…
Reference in New Issue
Block a user