diff --git a/grep-bz460641.patch b/grep-bz460641.patch new file mode 100644 index 0000000..4f1565f --- /dev/null +++ b/grep-bz460641.patch @@ -0,0 +1,12 @@ +diff -up grep-2.5.3/src/search.c.bz479152 grep-2.5.3/src/search.c +--- grep-2.5.3/src/search.c.bz479152 2009-01-08 09:57:12.000000000 +0100 ++++ grep-2.5.3/src/search.c 2009-01-08 09:58:57.000000000 +0100 +@@ -757,7 +757,7 @@ EXECUTE_FCT(Fexecute) + const char *last_char = NULL; + #endif /* MBS_SUPPORT */ + +- for (beg = start_ptr ? start_ptr : buf; beg <= buf + size; beg++) ++ for (beg = start_ptr ? start_ptr : buf; beg < buf + size; beg++) + { + size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch); + if (offset == (size_t) -1) diff --git a/grep.spec b/grep.spec index 6946286..ad10a6d 100644 --- a/grep.spec +++ b/grep.spec @@ -3,7 +3,7 @@ Summary: Pattern matching utilities Name: grep Version: 2.5.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: Applications/Text Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.bz2 @@ -12,6 +12,8 @@ Patch1: grep-2.5.3-mem-exhausted.patch Patch2: grep-2.5.3-pcrewrap.patch Patch3: grep-2.5.3-case.patch Patch4: grep-2.5.3-egf-speedup.patch +# bug #460641 (a.k.a. 479152) +Patch40: grep-bz460641.patch Patch5: grep-2.5.1a-utf8.patch URL: http://www.gnu.org/software/grep/ Requires(post): /sbin/install-info @@ -34,6 +36,7 @@ GNU grep is needed by many scripts, so it shall be installed on every system. %patch2 -p1 -b .pcrewrap %patch3 -p1 -b .case %patch4 -p1 -b .egf-speedup +%patch40 -p1 -b .bz460641 %patch5 -p1 -b .utf8 %build @@ -73,6 +76,9 @@ fi %{_mandir}/*/* %changelog +* Thu Jan 8 2009 Stepan Kasal 2.5.3-2 +- fix bug #460641 (a.k.a. 479152) + * Thu Nov 20 2008 Lubomir Rintel 2.5.3-1 - Update to latest upstream version - Drop upstreamed patches