rpms/system-config-printer/F-7 pycups-uninit.patch, NONE, 1.1 system-config-printer.spec, 1.114, 1.115
Tim Waugh (twaugh)
fedora-extras-commits at redhat.com
Wed Nov 21 11:48:35 UTC 2007
Author: twaugh
Update of /cvs/pkgs/rpms/system-config-printer/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16544
Modified Files:
system-config-printer.spec
Added Files:
pycups-uninit.patch
Log Message:
* Wed Nov 21 2007 Tim Waugh <twaugh at redhat.com> 0.7.74.6-2
- Applied patch to pycups to avoid reading uninitialised
memory (bug #390431).
pycups-uninit.patch:
--- NEW FILE pycups-uninit.patch ---
diff -up pycups-1.9.30/cupsconnection.c.uninit pycups-1.9.30/cupsconnection.c
--- pycups-1.9.30/cupsconnection.c.uninit 2007-11-19 16:41:14.000000000 +0000
+++ pycups-1.9.30/cupsconnection.c 2007-11-21 11:18:20.000000000 +0000
@@ -2334,7 +2334,7 @@ Connection_printTestPage (Connection *se
return NULL;
}
- if (!file) {
+ if (!fileobj) {
if ((datadir = getenv ("CUPS_DATADIR")) == NULL)
datadir = "/usr/share/cups";
@@ -2342,13 +2342,13 @@ Connection_printTestPage (Connection *se
file = filename;
}
- if (!title)
+ if (!titleobj)
title = "Test Page";
- if (!format)
+ if (!formatobj)
format = "application/postscript";
- if (!user)
+ if (!userobj)
user = "guest";
snprintf (uri, sizeof (uri), "ipp://localhost/printers/%s", printer);
diff -U0 pycups-1.9.30/ChangeLog.uninit pycups-1.9.30/ChangeLog
--- pycups-1.9.30/ChangeLog.uninit 2007-11-19 16:41:14.000000000 +0000
+++ pycups-1.9.30/ChangeLog 2007-11-21 11:18:20.000000000 +0000
@@ -0,0 +1,7 @@
+2007-11-21 Tim Waugh <twaugh at redhat.com>
+
+ * cupsmodule.c (cups_require): Don't read uninitialised memory.
+
+ * cupsconnection.c (Connection_printTestPage): Don't use
+ uninitialised variables (bug #390431).
+
diff -up pycups-1.9.30/cupsmodule.c.uninit pycups-1.9.30/cupsmodule.c
--- pycups-1.9.30/cupsmodule.c.uninit 2007-09-12 14:12:11.000000000 +0100
+++ pycups-1.9.30/cupsmodule.c 2007-11-21 11:18:20.000000000 +0000
@@ -253,13 +253,18 @@ cups_require (PyObject *self, PyObject *
nreq = strtoul (preq, &end, 0);
while (preq != end)
{
- preq = end + 1;
+ preq = end;
+ if (*preq == '.')
+ preq++;
nver = strtoul (pver, &end, 0);
if (pver == end)
goto fail;
- else
- pver = end + 1;
+ else {
+ pver = end;
+ if (*pver == '.')
+ pver++;
+ }
if (nver < nreq)
goto fail;
Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-7/system-config-printer.spec,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- system-config-printer.spec 19 Nov 2007 17:43:11 -0000 1.114
+++ system-config-printer.spec 21 Nov 2007 11:48:02 -0000 1.115
@@ -3,7 +3,7 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 0.7.74.6
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@@ -11,6 +11,7 @@
Source1: pycups-%{pycups_version}.tar.bz2
Source2: system-config-printer.pam
Source3: system-config-printer.console
+Patch0: pycups-uninit.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@@ -53,6 +54,9 @@
%prep
%setup -q -a 1
+pushd pycups-%{pycups_version}
+%patch0 -p1 -b .uninit
+popd
%build
%configure
@@ -135,6 +139,10 @@
exit 0
%changelog
+* Wed Nov 21 2007 Tim Waugh <twaugh at redhat.com> 0.7.74.6-2
+- Applied patch to pycups to avoid reading uninitialised
+ memory (bug #390431).
+
* Mon Nov 19 2007 Tim Waugh <twaugh at redhat.com> 0.7.74.6-1
- Updated pycups to 1.9.30.
- 0.7.74.6:
More information about the scm-commits
mailing list