This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Add utf8_to_uvchr_buf() and utf8_to_uvuni_buf()
authorKarl Williamson <public@khwilliamson.com>
Mon, 19 Mar 2012 21:03:01 +0000 (15:03 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 20 Mar 2012 00:23:44 +0000 (18:23 -0600)
commitec5f19d09949aac9034bb62ade44ffba8d4d2bb1
treeaee587b46e00f843fa393dcc6427dcbf632c1bd9
parentd0460f306d2b79d09a9e5694f9f72c50a2481b83
utf8.c: Add utf8_to_uvchr_buf() and utf8_to_uvuni_buf()

The existing functions (utf8_to_uvchr and utf8_to_uvuni) have a
deficiency in that they could read beyond the end of the input string if
given malformed input.  This commit creates two new functions which
behave as the old ones did, but have an extra parameter each, which
gives the upper limit to the string, so no read beyond it is done.
embed.fnc
embed.h
pod/perldelta.pod
proto.h
utf8.c