diff --git a/enscript-1.6.1-CAN-2004-1186.patch b/enscript-1.6.1-CAN-2004-1186.patch new file mode 100644 index 0000000..7c8f8e1 --- /dev/null +++ b/enscript-1.6.1-CAN-2004-1186.patch @@ -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) diff --git a/enscript.spec b/enscript.spec index 99ecd27..df77d38 100644 --- a/enscript.spec +++ b/enscript.spec @@ -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 +- 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).