From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3637 invoked by alias); 27 Feb 2012 17:35:48 -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: 30285 Received: (qmail 12191 invoked from network); 27 Feb 2012 17:35:46 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 27 Feb 2012 17:35:23 +0000 From: Peter Stephenson To: Leon Weber , Subject: Re: Integer overflow during brace expansion Message-ID: <20120227173523.2941f24d@pwslap01u.europe.root.pri> In-Reply-To: References: <20120227162251.GA17559@zaphod.q-ix.net> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.101.10.170] X-Scanned-By: MailControl 7.6.6 (www.mailcontrol.com) on 10.71.1.143 On Mon, 27 Feb 2012 18:01:23 +0100 Mikael Magnusson wrote: > I found the old thread now, pws suggested just using %ld and casting > the value to long, to which I replied something incomprehensibly > stupid, "but %d won't work if I cast to long". If nobody sees a > problem with the above patch, I can commit it with this change. > > - sprintf(p + strp, "%0*ld", minw, rend); > + sprintf(p + strp, "%0*ld", minw, (long)rend); I think that sounds OK for now. It would be quite nice to ensure we could output the full range one day, which isn't *that* difficult. However, that's a different problem. Leon Weber wrote: > PS: I already posted this on the sourceforge bug tracker before finding > out that's not in use. Perhaps it would be good to note this details > somewhere visible along with some hints on where to really report bugs, > since the sf tracker is the first google hit on 'zsh bugs' and this > mailing list doesn't show up anywhere near that. It's fine to have a record there, the problem is it doesn't actually notify anyone as currently configured; I'm pretty sure it used to, so this may be due to upgrades at Sourceforge. I've told it to report new entries to zsh-workers@zsh.org. If nobody minds, I could get it to report all changes to the list, which would be even safer. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog