develooper Front page | perl.perl5.porters | Postings from February 2009

Re: [PATCH] Fix array out-of-bounds error in utfebcdic.h

Thread Previous
From:
Rafael Garcia-Suarez
Date:
February 1, 2009 13:55
Subject:
Re: [PATCH] Fix array out-of-bounds error in utfebcdic.h
Message ID:
b77c1dce0902011355s6b8a4db4v290b7260327c5fd1@mail.gmail.com
2009/1/31 karl williamson <public@khwilliamson.com>:
> karl williamson wrote:
>>
>> Fix array out-of-bounds error in utfebcdic.h
>>
>> The UTF_START_MARK macro does a left shift, the result of which is used as
>> an index into a 256-byte array.  This causes a segfault.  Actually, the
>> expression desired is just the lower 256 bits of the result, so can  cast to
>> get rid of the upper bits.
>>
>> I also corrected and added a comment, and removed the trailing commas in
>> the array initializations that somewhere in the Perl documentation it says
>> that these are bad.
>>
> In looking over this patch, I realized it would be better to add a
> surrounding pair of parentheses, so here is it revised.
>

Thanks, applied as cbbb00c6b54a037bd5a2a10e54e58dc59af54a94

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About