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

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

Thread Next
From:
karl williamson
Date:
January 31, 2009 11:21
Subject:
[PATCH] Fix array out-of-bounds error in utfebcdic.h
Message ID:
4984A48F.6040107@khwilliamson.com
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.

Thread Next


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