- Applied patch to fix CAN-2004-1186 (bug #144684).

This commit is contained in:
Tim Waugh 2005-01-29 12:50:35 +00:00
parent 0498d5568f
commit 657c28d365
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- enscript-1.6.1/src/psgen.c.CAN-2004-1186 2005-01-10 15:57:07.432740602 +0000
+++ enscript-1.6.1/src/psgen.c 2005-01-10 15:58:24.606016206 +0000
@@ -1914,8 +1914,9 @@
else
{
ftail++;
- strncpy (buf, fname, ftail - fname);
- buf[ftail - fname] = '\0';
+ i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname;
+ strncpy (buf, fname, i);
+ buf[i] = '\0';
}
if (nup > 1)

View File

@ -11,6 +11,7 @@ Patch3: enscript-1.6.1-locale.patch
Patch4: enscript-doublefree.patch
Patch5: enscript-1.6.1-CAN-2004-1184.patch
Patch6: enscript-1.6.1-CAN-2004-1185.patch
Patch7: enscript-1.6.1-CAN-2004-1186.patch
URL: http://people.ssh.fi/mtr/genscript/index.html
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Obsoletes: nenscript
@ -30,6 +31,7 @@ includes many options for customizing printouts.
%patch4 -p1 -b .doublefree
%patch5 -p1 -b .CAN-2004-1184
%patch6 -p1 -b .CAN-2004-1185
%patch7 -p1 -b .CAN-2004-1185
%build
%configure --with-media=Letter
@ -66,6 +68,7 @@ rm -rf %{buildroot}
%changelog
* Tue Jan 29 2005 Tim Waugh <twaugh@redhat.com>
- Applied patch to fix CAN-2004-1186 (bug #144684).
- Applied patch to fix CAN-2004-1185 (bug #144684).
- Backported patch to fix CAN-2004-1184 (bug #144684).