On 07/15/2014 08:47 PM, Pádraig Brady wrote:
> On 07/15/2014 05:33 PM, Assaf Gordon wrote:
>> 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.
>>
>> <...>
> 
> Thanks Assaf and Eric.
> 
> That looks good to include in the release.
> No need to respin a snapshot for this though I think.

I didn't follow closely - you know, the FIFA world cup ;-) -
... but what about the other 17 uses of isblank() in src/*.c?

Have a nice day,
Berny

Reply via email to