Subject: bug#17082: closed (Re: bug#17082: [PATCH] grep: addition of ]' to special characters)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 24 Mar 2014 15:32:02 +0000

Your bug report

#17082: [PATCH] grep: addition of ]' to special characters

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17082: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17082
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17082: [PATCH] grep: addition of ]' to special characters
From: Paul Eggert <[email-masked]>
To: Norihiro Tanaka <[email-masked]>
Cc: [email-masked]
Date: Mon, 24 Mar 2014 08:31:22 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks, marking this as done.

By the way, if you haven't noticed, I'm trying to work my way through 
your nice series of bug reports and patches.  Part of what's slowing me 
down is that I keep finding related bugs in 'grep' while I'm reviewing 
your changes.  I'll keep at it....

Subject: [PATCH] grep: addition of ]' to special characters
From: Norihiro Tanaka <[email-masked]>
To: [email-masked]
Date: Mon, 24 Mar 2014 23:05:48 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Package: grep
Tags: patch

`]' should also take into special characters in fgrep_to_grep_pattern.

Norihiro
>From 47e891d0c66259c506db466f830bdf963037999a Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email-masked]>
Date: Mon, 24 Mar 2014 22:58:21 +0900
Subject: [PATCH] grep: addition of ]' to special characters

* src/grep.c (fgrep_to_grep_pattern): Add `]' to special characters.
---
 src/grep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/grep.c b/src/grep.c
index a1bccdb..86d7dca 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1931,7 +1931,7 @@ fgrep_to_grep_pattern (size_t len, char const *keys,
           /* Fall through.  */
         case 1:
           *p = '\\';
-          p += strchr ("$*.[\\^", *keys) != NULL;
+          p += strchr ("$*.[]\\^", *keys) != NULL;
           /* Fall through.  */
         case 0:
           *p++ = *keys;
-- 
1.9.1