On Sat, Jun 4, 2011 at 09:48, Jim Meyering <j...@meyering.net> wrote:
>> The b2 == EOF part is required for the somewhat similar bug I fixed
>> a month ago:
>>
>>     fix a bug whereby echo c|grep '[c]' would fail for any c in 0x80..0xff
>>     8da41c930e03a8635cbd8c89e3e591374c232c89
>>
>> The corresponding test demonstrates the need:
>>
>>     tests: exercise bug with 0x80..0xff in [...]
>>     d98338ebf842ec9b69631837eee50ebdcd543505

[\xff] is not well defined for a UTF-8 locale at all, actually.
Perhaps FETCH_WC should return wc = EOF in this case (and c = 255),
and it could be handled on a case-by-case basis elsewhere.

But if wctob returns EOF, and b > UCHAR_MAX, you have introduced an
out-of-bounds access in setbit.

Paolo



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to