From unknown Sun Aug 17 01:50:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17082: [PATCH] grep: addition of ]' to special characters Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 24 Mar 2014 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17082 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: 17082@debbugs.gnu.org X-Debbugs-Original-To: submit@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139566995812518 (code B ref -1); Mon, 24 Mar 2014 14:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Mar 2014 14:05:58 +0000 Received: from localhost ([127.0.0.1]:47705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS5Vl-0003Fo-UR for submit@debbugs.gnu.org; Mon, 24 Mar 2014 10:05:58 -0400 Received: from pbsg500.nifty.com ([202.248.238.70]:21056) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS5Vg-0003Fb-Qj for submit@debbugs.gnu.org; Mon, 24 Mar 2014 10:05:56 -0400 Received: from [10.120.1.36] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) (authenticated) by pbsg500.nifty.com with ESMTP id s2OE5lTh029644 for ; Mon, 24 Mar 2014 23:05:48 +0900 X-Nifty-SrcIP: [118.21.128.66] Date: Mon, 24 Mar 2014 23:05:48 +0900 From: Norihiro Tanaka Message-Id: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------_53303AB4000000006BAD_MULTIPART_MIXED_" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain --------_53303AB4000000006BAD_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro --------_53303AB4000000006BAD_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Disposition: attachment; filename="patch.txt" Content-Transfer-Encoding: 7bit >From 47e891d0c66259c506db466f830bdf963037999a Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka 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 --------_53303AB4000000006BAD_MULTIPART_MIXED_-- From unknown Sun Aug 17 01:50:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17082: [PATCH] grep: addition of ]' to special characters Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 24 Mar 2014 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17082 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Norihiro Tanaka , 17082@debbugs.gnu.org Received: via spool by 17082-submit@debbugs.gnu.org id=B17082.139567400319805 (code B ref 17082); Mon, 24 Mar 2014 15:14:02 +0000 Received: (at 17082) by debbugs.gnu.org; 24 Mar 2014 15:13:23 +0000 Received: from localhost ([127.0.0.1]:47764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6Z0-00059K-L2 for submit@debbugs.gnu.org; Mon, 24 Mar 2014 11:13:23 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:33735) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6Yx-000598-AH for 17082@debbugs.gnu.org; Mon, 24 Mar 2014 11:13:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 6464BA60002; Mon, 24 Mar 2014 08:13:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ec-yOmte0eWs; Mon, 24 Mar 2014 08:13:18 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 0B0AFA60001; Mon, 24 Mar 2014 08:13:18 -0700 (PDT) Message-ID: <53304B8D.4080607@cs.ucla.edu> Date: Mon, 24 Mar 2014 08:13:17 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 References: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> In-Reply-To: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Norihiro Tanaka wrote: > `]' should also take into special characters in fgrep_to_grep_pattern. Sorry, I'm not seeing it. Can you please give an example fgrep pattern to explain why ']' needs to be escaped? From unknown Sun Aug 17 01:50:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17082: [PATCH] grep: addition of ]' to special characters Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 24 Mar 2014 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17082 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 17082@debbugs.gnu.org Received: via spool by 17082-submit@debbugs.gnu.org id=B17082.139567490821424 (code B ref 17082); Mon, 24 Mar 2014 15:29:02 +0000 Received: (at 17082) by debbugs.gnu.org; 24 Mar 2014 15:28:28 +0000 Received: from localhost ([127.0.0.1]:47779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6nc-0005ZT-3u for submit@debbugs.gnu.org; Mon, 24 Mar 2014 11:28:28 -0400 Received: from pbsg500.nifty.com ([202.248.238.70]:27469) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6nY-0005ZH-GH for 17082@debbugs.gnu.org; Mon, 24 Mar 2014 11:28:27 -0400 Received: from [10.120.1.36] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) (authenticated) by pbsg500.nifty.com with ESMTP id s2OFSDf1021418; Tue, 25 Mar 2014 00:28:14 +0900 X-Nifty-SrcIP: [118.21.128.66] Date: Tue, 25 Mar 2014 00:28:14 +0900 From: Norihiro Tanaka In-Reply-To: <53304B8D.4080607@cs.ucla.edu> References: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> <53304B8D.4080607@cs.ucla.edu> Message-Id: <20140325002813.6BBF.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Paul, Sorry, I was wrong. `]' isn't a special character without `['. On Mon, 24 Mar 2014 08:13:17 -0700 Paul Eggert wrote: [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Paul, Sorry, I was wrong. `]' isn't a special character without `['. On Mon, 24 Mar 2014 08:13:17 -0700 Paul Eggert wrote: [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Hi Paul, Sorry, I was wrong. `]' isn't a special character without `['. On Mon, 24 Mar 2014 08:13:17 -0700 Paul Eggert wrote: > Norihiro Tanaka wrote: > > `]' should also take into special characters in fgrep_to_grep_pattern. > > Sorry, I'm not seeing it. Can you please give an example fgrep pattern to explain why ']' needs to be escaped? From unknown Sun Aug 17 01:50:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Norihiro Tanaka Subject: bug#17082: closed (Re: bug#17082: [PATCH] grep: addition of ]' to special characters) Message-ID: References: <53304FCA.3020307@cs.ucla.edu> <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> X-Gnu-PR-Message: they-closed 17082 X-Gnu-PR-Package: grep X-Gnu-PR-Keywords: patch Reply-To: 17082@debbugs.gnu.org Date: Mon, 24 Mar 2014 15:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1395675122-21856-1" This is a multi-part message in MIME format... ------------=_1395675122-21856-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 17082@debbugs.gnu.org. --=20 17082: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17082 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1395675122-21856-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17082-done) by debbugs.gnu.org; 24 Mar 2014 15:31:27 +0000 Received: from localhost ([127.0.0.1]:47783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6qU-0005fb-O2 for submit@debbugs.gnu.org; Mon, 24 Mar 2014 11:31:27 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34748) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS6qS-0005fQ-RZ for 17082-done@debbugs.gnu.org; Mon, 24 Mar 2014 11:31:25 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7AABCA60003; Mon, 24 Mar 2014 08:31:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkNykLjAudK2; Mon, 24 Mar 2014 08:31:23 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1E1D7A60002; Mon, 24 Mar 2014 08:31:23 -0700 (PDT) Message-ID: <53304FCA.3020307@cs.ucla.edu> Date: Mon, 24 Mar 2014 08:31:22 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Norihiro Tanaka Subject: Re: bug#17082: [PATCH] grep: addition of ]' to special characters References: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> <53304B8D.4080607@cs.ucla.edu> <20140325002813.6BBF.27F6AC2D@kcn.ne.jp> In-Reply-To: <20140325002813.6BBF.27F6AC2D@kcn.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 17082-done Cc: 17082-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) 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.... ------------=_1395675122-21856-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Mar 2014 14:05:58 +0000 Received: from localhost ([127.0.0.1]:47705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS5Vl-0003Fo-UR for submit@debbugs.gnu.org; Mon, 24 Mar 2014 10:05:58 -0400 Received: from pbsg500.nifty.com ([202.248.238.70]:21056) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WS5Vg-0003Fb-Qj for submit@debbugs.gnu.org; Mon, 24 Mar 2014 10:05:56 -0400 Received: from [10.120.1.36] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) (authenticated) by pbsg500.nifty.com with ESMTP id s2OE5lTh029644 for ; Mon, 24 Mar 2014 23:05:48 +0900 X-Nifty-SrcIP: [118.21.128.66] Date: Mon, 24 Mar 2014 23:05:48 +0900 From: Norihiro Tanaka To: submit@debbugs.gnu.org Subject: [PATCH] grep: addition of ]' to special characters Message-Id: <20140324230519.6BB4.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------_53303AB4000000006BAD_MULTIPART_MIXED_" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [202.248.238.70 listed in psbl.surriel.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain --------_53303AB4000000006BAD_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Package: grep Tags: patch `]' should also take into special characters in fgrep_to_grep_pattern. Norihiro --------_53303AB4000000006BAD_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Disposition: attachment; filename="patch.txt" Content-Transfer-Encoding: 7bit >From 47e891d0c66259c506db466f830bdf963037999a Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka 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 --------_53303AB4000000006BAD_MULTIPART_MIXED_-- ------------=_1395675122-21856-1--