From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9797 invoked by alias); 16 Mar 2013 18:33:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31158 Received: (qmail 28126 invoked from network); 16 Mar 2013 18:32:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130316113226.ZM22610@torch.brasslantern.com> Date: Sat, 16 Mar 2013 11:32:26 -0700 In-reply-to: <87ehffjolk.fsf@gmail.com> Comments: In reply to Christian Neukirchen "Stack overflow with extended globs" (Mar 16, 5:28pm) References: <87ehffjolk.fsf@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Stack overflow with extended globs MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Mar 16, 5:28pm, Christian Neukirchen wrote: } } juno% setopt extendedglob; echo *(#c3,)x* } } Program received signal SIGSEGV, Segmentation fault. I think we want either this: Index: Src/pattern.c =================================================================== --- pattern.c 21 Dec 2010 16:41:16 -0000 +++ pattern.c 16 Mar 2013 18:21:36 -0000 @@ -1474,7 +1474,7 @@ } /* too much at once doesn't currently work */ - if (kshchar && pound) + if (kshchar && (pound || count)) return 0; if (kshchar == '*') { Or this: Index: Src/pattern.c =================================================================== --- pattern.c 21 Dec 2010 16:41:16 -0000 +++ pattern.c 16 Mar 2013 18:23:53 -0000 @@ -1474,7 +1474,7 @@ } /* too much at once doesn't currently work */ - if (kshchar && pound) + if (kshchar && pound || kshchar < 0 && count) return 0; if (kshchar == '*') { But I'm not sure which. I tend to think the former.