bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Built-in printf Sits Awkwardly with UDP.


From: Ralph Corderoy
Subject: Re: Built-in printf Sits Awkwardly with UDP.
Date: Mon, 25 Jul 2011 13:49:31 +0100

Hi Chet,

> On 7/22/11 10:38 AM, Ralph Corderoy wrote:
> > On a related note, I can't interrupt this, e.g. Ctrl-C.
> > 
> >     printf '%-92233720368547758q.\n' foo
> 
> That's interesting, since the fieldwidth (and precision) end up
> getting set to 0 if they overflow INT_MAX, at least on my machine, and
> the result is more or less instantaneous.  I agree that bash should do
> the same thing in printstr when presented with an overflowing field
> width that it does when using getint().  I will look at making that
> change.

I also get, with vanilla 4.2 built from source,

    $ ./install/bin/bash -c "printf '%*q.\n' 10 foo -20 bar 0x80000000"
           foo.
    bar                 .
    Segmentation fault (core dumped)
    $ 

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]