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)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 2 Sep 2011 15:18:56 +0000 (08:18 -0700)
commit3808f14a4da5927a92ec30527c260c01bad3f340
tree640106947120036dc8124a1a5da525e958eaae96
parentae38025c1617ab0606fba64e716a4820603b5f04
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.
(cherry picked from commit 3e2d3818e517e0037c1ab6a482f31d50271f9e27)
embed.fnc
proto.h
sv.c
t/op/index.t