drop grep-mem-exhausted.patch
This commit is contained in:
parent
f979cd98dd
commit
710f207126
@ -1,33 +0,0 @@
|
|||||||
From 3e85874b1ea00d395a2add6b1cf38eef34bc2c38 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tim Waugh <twaugh@redhat.com>
|
|
||||||
Date: Sun, 23 Nov 2008 17:54:33 +0100
|
|
||||||
Subject: [PATCH] Limit in-memory buffer size
|
|
||||||
|
|
||||||
Limit the amount of saved data to 200Mb so we don't fail on
|
|
||||||
large files.
|
|
||||||
|
|
||||||
Original ticket: https://bugzilla.redhat.com/show_bug.cgi?id=198165
|
|
||||||
---
|
|
||||||
src/grep.c | 6 ++++++
|
|
||||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/grep.c b/src/grep.c
|
|
||||||
index 4363b4a..46ce140 100644
|
|
||||||
--- a/src/grep.c
|
|
||||||
+++ b/src/grep.c
|
|
||||||
@@ -492,6 +492,12 @@ fillbuf (size_t save, struct stats const *stats)
|
|
||||||
int cc = 1;
|
|
||||||
char *readbuf;
|
|
||||||
size_t readsize;
|
|
||||||
+ const size_t max_save = 200 * 1024 * 1024;
|
|
||||||
+
|
|
||||||
+ /* Limit the amount of saved data to 200Mb so we don't fail on
|
|
||||||
+ * large files. */
|
|
||||||
+ if (save > max_save)
|
|
||||||
+ save = max_save;
|
|
||||||
|
|
||||||
/* Offset from start of buffer to start of old stuff
|
|
||||||
that we want to save. */
|
|
||||||
--
|
|
||||||
1.5.5.1
|
|
||||||
|
|
@ -3,12 +3,11 @@
|
|||||||
Summary: Pattern matching utilities
|
Summary: Pattern matching utilities
|
||||||
Name: grep
|
Name: grep
|
||||||
Version: 2.5.3
|
Version: 2.5.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.bz2
|
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.bz2
|
||||||
Patch0: grep-2.5.3-fedora-tests.patch
|
Patch0: grep-2.5.3-fedora-tests.patch
|
||||||
Patch1: grep-2.5.3-mem-exhausted.patch
|
|
||||||
Patch2: grep-2.5.3-pcrewrap.patch
|
Patch2: grep-2.5.3-pcrewrap.patch
|
||||||
Patch3: grep-2.5.3-case.patch
|
Patch3: grep-2.5.3-case.patch
|
||||||
Patch4: grep-2.5.3-egf-speedup.patch
|
Patch4: grep-2.5.3-egf-speedup.patch
|
||||||
@ -32,7 +31,6 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .fedora-tests
|
%patch0 -p1 -b .fedora-tests
|
||||||
%patch1 -p1 -b .mem-exhausted
|
|
||||||
%patch2 -p1 -b .pcrewrap
|
%patch2 -p1 -b .pcrewrap
|
||||||
%patch3 -p1 -b .case
|
%patch3 -p1 -b .case
|
||||||
%patch4 -p1 -b .egf-speedup
|
%patch4 -p1 -b .egf-speedup
|
||||||
@ -76,6 +74,9 @@ fi
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 27 2009 Stepan Kasal <skasal@redhat.com> 2.5.3-3
|
||||||
|
- remove grep-mem-exhausted.patch (#481765, #198165)
|
||||||
|
|
||||||
* Thu Jan 8 2009 Stepan Kasal <skasal@redhat.com> 2.5.3-2
|
* Thu Jan 8 2009 Stepan Kasal <skasal@redhat.com> 2.5.3-2
|
||||||
- fix bug #460641 (a.k.a. 479152)
|
- fix bug #460641 (a.k.a. 479152)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user