From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17957 invoked from network); 28 Mar 2003 18:24:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Mar 2003 18:24:17 -0000 Received: (qmail 20299 invoked by alias); 28 Mar 2003 18:23:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18402 Received: (qmail 20286 invoked from network); 28 Mar 2003 18:23:40 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Mar 2003 18:23:40 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.54.253.222] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Mar 2003 18:23:39 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id B0D08351; Fri, 28 Mar 2003 10:23:26 -0800 (PST) Date: Fri, 28 Mar 2003 10:23:26 -0800 From: Wayne Davison To: Bart Schaefer Cc: zsh-workers@sunsite.dk Subject: Re: Another crash bug in "print" Message-ID: <20030328182326.GC2951@binome.blorf.net> References: <1030328173510.ZM27402@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030328173510.ZM27402@candle.brasslantern.com> User-Agent: Mutt/1.4.1i On Fri, Mar 28, 2003 at 05:35:10PM +0000, Bart Schaefer wrote: > zagzig% print -m > zsh: segmentation fault (core dumped) Src/zsh -f This looks like the right fix to me: Index: Src/builtin.c --- Src/builtin.c 17 Feb 2003 10:08:03 -0000 1.97 +++ Src/builtin.c 28 Mar 2003 18:21:25 -0000 @@ -3111,7 +3111,11 @@ if (OPT_ISSET(ops,'m')) { Patprog pprog; char **t, **p; - + + if (!*args) { + zwarnnam(name, "no pattern specified", NULL, 0); + return 1; + } tokenize(*args); if (!(pprog = patcompile(*args, PAT_STATIC, NULL))) { untokenize(*args); ..wayne..