summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-20 13:29:38 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-20 14:49:09 -0800
commitf9cf141af97dff1d857ee2f905962a19ac97fc36 (patch)
tree9c4d0546f722bcc7e1ea251aeb5c97e71859ac2c /sv.c
parent05bb32d213ce171a55a6a7226fba6f1f1fea3fd6 (diff)
downloadperl-f9cf141af97dff1d857ee2f905962a19ac97fc36.tar.gz
[perl #82772] utf8::decode: Don’t read past SvCUR
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index d116996e77..6e8ed664c8 100644
--- a/sv.c
+++ b/sv.c
@@ -3562,7 +3562,7 @@ Perl_sv_utf8_decode(pTHX_ register SV *const sv)
* we want to make sure everything inside is valid utf8 first.
*/
c = start = (const U8 *) SvPVX_const(sv);
- if (!is_utf8_string(c, SvCUR(sv)+1))
+ if (!is_utf8_string(c, SvCUR(sv)))
return FALSE;
e = (const U8 *) SvEND(sv);
while (c < e) {