zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: Leon Weber <leon@leonweber.de>, <zsh-workers@zsh.org>
Subject: Re: Integer overflow during brace expansion
Date: Mon, 27 Feb 2012 17:35:23 +0000	[thread overview]
Message-ID: <20120227173523.2941f24d@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAHYJk3TtwY7eUXRrB9DfoAva+LUoFTnyi4wVNBqR2WvB7NG=PQ@mail.gmail.com>

On Mon, 27 Feb 2012 18:01:23 +0100
Mikael Magnusson <mikachu@gmail.com> 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 <leon@leonweber.de> 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 <pws@csr.com>            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


  reply	other threads:[~2012-02-27 17:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 16:22 Leon Weber
2012-02-27 16:52 ` Mikael Magnusson
2012-02-27 16:54   ` Mikael Magnusson
2012-02-27 17:01     ` Mikael Magnusson
2012-02-27 17:35       ` Peter Stephenson [this message]
2012-03-01 14:30         ` Peter Stephenson
2012-03-01 16:20           ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120227173523.2941f24d@pwslap01u.europe.root.pri \
    --to=peter.stephenson@csr.com \
    --cc=leon@leonweber.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).