summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-02-11 15:01:21 +0100
committerLars Wendler <polynomial-c@gentoo.org>2017-02-11 15:01:52 +0100
commite2a11e4705ce1f1c47cb097dbdf1f6da6df67c3f (patch)
treee509cd5a74aca68f58cb72de5599c08d74b4e96b /sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch
parentkde-apps/kopete: Remove 16.12.2 (r0) (diff)
downloadgentoo-e2a11e4705ce1f1c47cb097dbdf1f6da6df67c3f.tar.gz
gentoo-e2a11e4705ce1f1c47cb097dbdf1f6da6df67c3f.tar.bz2
gentoo-e2a11e4705ce1f1c47cb097dbdf1f6da6df67c3f.zip
sys-apps/grep: Removed old.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch')
-rw-r--r--sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch97
1 files changed, 0 insertions, 97 deletions
diff --git a/sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch b/sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch
deleted file mode 100644
index f6cf64d3831..00000000000
--- a/sys-apps/grep/files/grep-2.28-multiple_pattern_fix.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 6e4c8728f0e75af57f839625d0bd51b0a02d091e Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Wed, 8 Feb 2017 13:00:11 -0800
-Subject: grep: do not mishandle \. in multiple patterns
-
-Problem reported by Lars Wendler (Bug#25655).
-* NEWS: Document this.
-* src/grep.c (try_fgrep_pattern): Fix typo that prevented
-keys from being properly updated.
-* tests/foad1: Test for the bug.
----
- src/grep.c | 15 ++++++++-------
- tests/foad1 | 7 +++++++
- 3 files changed, 20 insertions(+), 7 deletions(-)
-
-diff --git a/src/grep.c b/src/grep.c
-index 81654c3..74acb0b 100644
---- a/src/grep.c
-+++ b/src/grep.c
-@@ -2361,11 +2361,12 @@ try_fgrep_pattern (int matcher, char *keys, size_t *len_p)
- size_t len = *len_p;
- char *new_keys = xmalloc (len + 1);
- char *p = new_keys;
-+ char const *q = keys;
- mbstate_t mb_state = { 0 };
-
- while (len != 0)
- {
-- switch (*keys)
-+ switch (*q)
- {
- case '$': case '*': case '.': case '[': case '^':
- goto fail;
-@@ -2377,7 +2378,7 @@ try_fgrep_pattern (int matcher, char *keys, size_t *len_p)
-
- case '\\':
- if (1 < len)
-- switch (keys[1])
-+ switch (q[1])
- {
- case '\n':
- case 'B': case 'S': case 'W': case'\'': case '<':
-@@ -2391,7 +2392,7 @@ try_fgrep_pattern (int matcher, char *keys, size_t *len_p)
- goto fail;
- /* Fall through. */
- default:
-- keys++, len--;
-+ q++, len--;
- break;
- }
- break;
-@@ -2401,20 +2402,20 @@ try_fgrep_pattern (int matcher, char *keys, size_t *len_p)
- size_t n;
- if (match_icase)
- {
-- int ni = fgrep_icase_charlen (keys, len, &mb_state);
-+ int ni = fgrep_icase_charlen (q, len, &mb_state);
- if (ni < 0)
- goto fail;
- n = ni;
- }
- else
- {
-- n = mb_clen (keys, len, &mb_state);
-+ n = mb_clen (q, len, &mb_state);
- if (MB_LEN_MAX < n)
- goto fail;
- }
-
-- p = mempcpy (p, keys, n);
-- keys += n;
-+ p = mempcpy (p, q, n);
-+ q += n;
- len -= n;
- }
- }
-diff --git a/tests/foad1 b/tests/foad1
-index 286c449..0163f1a 100755
---- a/tests/foad1
-+++ b/tests/foad1
-@@ -137,6 +137,13 @@ grep_test "$x2" "$y2" -F -w --color=always bc
- grep_test "$x3" "$y3" -E -w --color=always bc
- grep_test "$x3" "$y3" -F -w --color=always bc
-
-+# Bug#25655
-+grep_test .tar/ .tar/ -e '\.tar' -e '\.tbz'
-+grep_test .tar/ .tar/ -o -e '\.tar' -e 'tar'
-+grep_test '$*.[^\/' '$*.[^\/' -o -e '\$\*\.\[\^\\' -e abc
-+grep_test '$*.[^\/(+?{|/' '$*.[^\/(+?{|/' -o -E \
-+ -e '\$\*\.\[\^\\' -e '\(\+\?\{\|'
-+
- # Skip the rest of the tests - known to fail. TAA.
- Exit $failures
-
---
-cgit v1.0-41-gc330
-