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

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

Thread Previous
Rafael Garcia-Suarez
February 1, 2009 13:55
Re: [PATCH] Fix array out-of-bounds error in utfebcdic.h
Message ID:
2009/1/31 karl williamson <>:
> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About