[Top][All Lists]

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

Re: Built-in printf Sits Awkwardly with UDP.

From: Eric Blake
Subject: Re: Built-in printf Sits Awkwardly with UDP.
Date: Wed, 20 Jul 2011 09:48:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11

[adding coreutils]

On 07/20/2011 07:34 AM, Ralph Corderoy wrote:
BTW, the code for the built-in printf has a bug.  For negative
field-widths it negates a negative integer without checking it will fit.
E.g. on this 64-bit machine

     $ printf '%-9223372036854775808s.\n' foo

Coreutils' printf shares this misfortune. Sadly, it might even be a bug in the underlying glibc printf(), although I haven't tried to write a test program to check that, yet.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

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