Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Integer overflow during brace expansion



On Mon, 27 Feb 2012 18:01:23 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> 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@xxxxxxxxxxxx> 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@xxxxxxx.  If nobody minds, I could get it to
report all changes to the list, which would be even safer.

-- 
Peter Stephenson <pws@xxxxxxx>            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



Messages sorted by: Reverse Date, Date, Thread, Author