diff --git a/enscript-bufpos-crash.patch b/enscript-bufpos-crash.patch new file mode 100644 index 0000000..60417ee --- /dev/null +++ b/enscript-bufpos-crash.patch @@ -0,0 +1,12 @@ +diff -up enscript-1.6.5.2/src/psgen.c.bufpos-crash enscript-1.6.5.2/src/psgen.c +--- enscript-1.6.5.2/src/psgen.c.bufpos-crash 2013-05-13 16:18:05.119393660 +0100 ++++ enscript-1.6.5.2/src/psgen.c 2013-05-13 16:19:17.634739778 +0100 +@@ -1928,7 +1928,7 @@ get_next_token (InputStream *is, double + bufpos--; + } + /* Check the octal notations "\\%03o". */ +- else if (bufpos - 2 > w ++ else if (bufpos > 2 && bufpos - 2 > w + && ISOCTAL (buffer[bufpos]) + && ISOCTAL (buffer[bufpos - 1]) + && ISOCTAL (buffer[bufpos - 2]) diff --git a/enscript.spec b/enscript.spec index edd31e9..2e1bba5 100644 --- a/enscript.spec +++ b/enscript.spec @@ -1,7 +1,7 @@ Summary: A plain ASCII to PostScript converter Name: enscript Version: 1.6.5.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: Applications/Publishing URL: http://www.gnu.org/software/enscript @@ -25,6 +25,7 @@ Patch8: enscript-wrap_header.patch Patch9: enscript-1.6.4-rh457719.patch Patch10:enscript-1.6.4-rh457720.patch Patch12:enscript-rh477382.patch +Patch13: enscript-bufpos-crash.patch Requires(preun): /sbin/install-info Requires(post): /sbin/install-info BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -49,6 +50,7 @@ includes many options for customizing printouts %patch9 -p1 -b .rh457719 %patch10 -p1 -b .rh457720 %patch12 -p1 -b .rh477382 +%patch13 -p1 -b .bufpos-crash %{__tar} -C states/hl -zxf %{SOURCE1} ruby.st install -pm 644 %{SOURCE2} states/hl/php.st @@ -109,6 +111,9 @@ fi %config(noreplace) %{_sysconfdir}/enscript.cfg %changelog +* Mon May 13 2013 Tim Waugh - 1.6.5.2-6 +- Fixed word-wrapping crash in tokenizer (bug #870639). + * Fri Jan 13 2012 Fedora Release Engineering - 1.6.5.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild