summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/grep/14-mem-exhausted.patch
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/grep/14-mem-exhausted.patch
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core-testing/grep/14-mem-exhausted.patch')
-rw-r--r--abs/core-testing/grep/14-mem-exhausted.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/abs/core-testing/grep/14-mem-exhausted.patch b/abs/core-testing/grep/14-mem-exhausted.patch
new file mode 100644
index 0000000..d6a996d
--- /dev/null
+++ b/abs/core-testing/grep/14-mem-exhausted.patch
@@ -0,0 +1,15 @@
+--- grep-2.5.1a/src/grep.c.mem-exhausted 2006-11-22 14:49:35.000000000 +0000
++++ grep-2.5.1a/src/grep.c 2006-11-22 14:53:12.000000000 +0000
+@@ -299,6 +299,12 @@
+ 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. */