From 61501477eb930a38f0405dfb28dd667098c6228b Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Feb 03 2006 14:12:33 +0000 Subject: - Prevent 'grep -P' from segfaulting (bug #171379). --- diff --git a/grep-P.patch b/grep-P.patch new file mode 100644 index 0000000..9dca4ad --- /dev/null +++ b/grep-P.patch @@ -0,0 +1,14 @@ +--- grep-2.5.1a/src/search.c.P 2006-02-03 14:08:00.000000000 +0000 ++++ grep-2.5.1a/src/search.c 2006-02-03 14:11:20.000000000 +0000 +@@ -1234,8 +1234,9 @@ + char eol = eolbyte; + if (!exact) + { +- end = memchr (end, eol, buflim - end); +- end++; ++ while (end < buflim) ++ if (*end++ == eol) ++ break; + while (buf < beg && beg[-1] != eol) + --beg; + } diff --git a/grep.spec b/grep.spec index 0d33138..6ca6cb6 100644 --- a/grep.spec +++ b/grep.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of grep pattern matching utilities. Name: grep Version: 2.5.1 -Release: 51.1 +Release: 52 License: GPL Group: Applications/Text Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}a.tar.bz2 @@ -16,6 +16,7 @@ Patch10: grep-2.5.1-egf-speedup.patch Patch11: grep-2.5.1-dfa-optional.patch Patch12: grep-2.5.1-tests.patch Patch13: grep-2.5.1-w.patch +Patch14: grep-P.patch URL: http://www.gnu.org/software/grep/ Prereq: /sbin/install-info Buildroot: %{_tmppath}/%{name}-%{version}-root @@ -43,6 +44,7 @@ utility for searching through text. %patch11 -p1 -b .dfa-optional %patch12 -p1 -b .tests %patch13 -p1 -b .w +%patch14 -p1 -b .P chmod a+x tests/fmbtest.sh %build @@ -92,6 +94,9 @@ fi %{_mandir}/*/* %changelog +* Fri Feb 3 2006 Tim Waugh 2.5.1-52 +- Prevent 'grep -P' from segfaulting (bug #171379). + * Fri Dec 09 2005 Jesse Keating - rebuilt