From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19287 invoked from network); 14 Aug 2006 12:53:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Aug 2006 12:53:08 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 82306 invoked from network); 14 Aug 2006 12:53:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 12:53:01 -0000 Received: (qmail 27971 invoked by alias); 14 Aug 2006 12:52:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22605 Received: (qmail 27962 invoked from network); 14 Aug 2006 12:52:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Aug 2006 12:52:58 -0000 Received: (qmail 81987 invoked from network); 14 Aug 2006 12:52:58 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 12:52:57 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly24c.srv.mailcontrol.com (MailControl) with ESMTP id k7ECpicI024021 for ; Mon, 14 Aug 2006 13:52:53 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 14 Aug 2006 13:52:10 +0100 Date: Mon, 14 Aug 2006 13:52:09 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: Infinite loop in compprintfmt() (complist.c rev 1.91) Message-Id: <20060814135209.08fc27c9.pws@csr.com> In-Reply-To: <060813214800.ZM6506@torch.brasslantern.com> References: <060813214800.ZM6506@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.6.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Aug 2006 12:52:10.0761 (UTC) FILETIME=[75241790:01C6BFA0] X-Scanned-By: MailControl A-07-04-01 (www.mailcontrol.com) on 10.67.0.134 Bart Schaefer wrote: > Here's a gdb walk-through -- note we return to line 896 (really the loop > at 892) without ever incrementing the loop variable. Yes, I missed the dopr==0 branch when I moved the increment into the point where we're possibly printing more than one byte. Index: Src/Zle/complist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v retrieving revision 1.91 diff -u -r1.91 complist.c --- Src/Zle/complist.c 11 Aug 2006 21:30:38 -0000 1.91 +++ Src/Zle/complist.c 14 Aug 2006 12:50:29 -0000 @@ -1069,6 +1069,8 @@ return mlprinted; } } + else + p += len; } } if (dopr) { -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php