This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid UTF-8 cache panics with offsets beyond the string. Fixes RT #75898.
authorNicholas Clark <nick@ccl4.org>
Sun, 11 Jul 2010 19:11:10 +0000 (20:11 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 11 Jul 2010 19:11:10 +0000 (20:11 +0100)
commit3e2d3818e517e0037c1ab6a482f31d50271f9e27
tree4321d02f848df637484bdcb68c79e11d0493e3fa
parent48f9cf718354a5326f9e9d40d02a063952160024
Avoid UTF-8 cache panics with offsets beyond the string. Fixes RT #75898.

Change S_sv_pos_u2b_forwards() to take a point to the (requested) UTF-8 offset,
and return the actual UTF-8 offset for the byte position returned. This ensures
that the cache is consistent with reality.
embed.fnc
proto.h
sv.c
t/op/index.t