summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-12 22:23:17 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-12 22:23:17 +0000
commit0b253ea1ef22325a3009d594304dd37591a47a30 (patch)
tree4b53b52bbdc30710563dd10dd19fb925e294b685 /sys-apps/grep/files
parentAdd ~alpha keyword. (diff)
downloadhistorical-0b253ea1ef22325a3009d594304dd37591a47a30.tar.gz
historical-0b253ea1ef22325a3009d594304dd37591a47a30.tar.bz2
historical-0b253ea1ef22325a3009d594304dd37591a47a30.zip
Fix segfault with perl regex usage #95495 by emanuele.giaquinta@gmail.com and update the restrict_arr to be portable #92586.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'sys-apps/grep/files')
-rw-r--r--sys-apps/grep/files/digest-grep-2.5.1-r81
-rw-r--r--sys-apps/grep/files/grep-2.5.1-perl-segv.patch19
-rw-r--r--sys-apps/grep/files/grep-2.5.1-restrict_arr.patch8
3 files changed, 22 insertions, 6 deletions
diff --git a/sys-apps/grep/files/digest-grep-2.5.1-r8 b/sys-apps/grep/files/digest-grep-2.5.1-r8
new file mode 100644
index 000000000000..ef03a032aa20
--- /dev/null
+++ b/sys-apps/grep/files/digest-grep-2.5.1-r8
@@ -0,0 +1 @@
+MD5 85df024edc9f9689035f6b3de28c7731 grep-2.5.1.tar.gz 683093
diff --git a/sys-apps/grep/files/grep-2.5.1-perl-segv.patch b/sys-apps/grep/files/grep-2.5.1-perl-segv.patch
new file mode 100644
index 000000000000..46218a1f4614
--- /dev/null
+++ b/sys-apps/grep/files/grep-2.5.1-perl-segv.patch
@@ -0,0 +1,19 @@
+Fix from upstream to fix a corner case segfault.
+
+http://bugs.gentoo.org/95495
+
+--- grep-2.5.1/src/search.c
++++ grep-2.5.1/src/search.c
+@@ -701,8 +701,10 @@
+ char eol = eolbyte;
+ if (!exact)
+ {
+- end = memchr (end, eol, buflim - end);
+- end++;
++ if (!(end = memchr (end, eol, buflim - end)))
++ end = buflim;
++ else
++ end++;
+ while (buf < beg && beg[-1] != eol)
+ --beg;
+ }
diff --git a/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch b/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch
index b60a3c2aa971..2294e9c2372a 100644
--- a/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch
+++ b/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch
@@ -1,15 +1,11 @@
--- lib/posix/regex.h
+++ lib/posix/regex.h
-@@ -533,7 +533,12 @@ extern int re_exec _RE_ARGS ((const char
+@@ -533,7 +533,8 @@ extern int re_exec _RE_ARGS ((const char
/* For now unconditionally define __restrict_arr to expand to nothing.
Ideally we would have a test for the compiler which allows defining
it to restrict. */
-+#if !defined(sun)
-+# include <features.h>
-+#endif
-+#if !defined(__UCLIBC__) || !defined(__restrict_arr)
++#undef __restrict_arr
#define __restrict_arr
-+#endif
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,