coreutils
[Top][All Lists]
Advanced

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

Re: [platform-testers] new snapshot available: coreutils-8.22.151-37b36


From: Pádraig Brady
Subject: Re: [platform-testers] new snapshot available: coreutils-8.22.151-37b36
Date: Tue, 15 Jul 2014 19:47:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 07/15/2014 05:33 PM, Assaf Gordon wrote:
> Hello Eric, Pádraig,
> 
> On 07/15/2014 12:33 AM, Eric Blake wrote:
>> Here's some real errors:
>>
> <...>
>>
>> Ouch. isdigit() is fairly safe (because POSIX limits it to returning
>> true for exactly 10 bytes that can't become negative when promoted to
>> int), but isblank((int)char) is an absolute bug - there are locales
>> where isblank(255) != isblank((int)(char)255), because char is signed
>> and the value promotes to -1 which is indistinguishable from EOF.  Are
>> you sure this code shouldn't be using gnulib's c_isdgit and c_isblank
>> instead?  And if you DO want locale comparisons, then use isblank
>> (to_uchar (**endptr)).
>>
> 
> Attached is a patch to replace isdigit/isblank with c_isdigit/c_isblank in 
> numfmt.
> 
> Since numfmt currently does not handle multibyte characters, it is simpler 
> (and quicker for this release) to force the C locale calls, as you suggested.
> I hope in the future to add true multibyte support.
> 
> Regards,
>  -gordon

Thanks Assaf and Eric.

That looks good to include in the release.
No need to respin a snapshot for this though I think.

thanks,
Pádraig.




reply via email to

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