diff options
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2321,7 +2321,7 @@ PP(pp_ucfirst) if (DO_UTF8(sv) && (s = (U8*)SvPV(sv, slen)) && slen && (*s & 0xc0) == 0xc0) { STRLEN ulen; - U8 tmpbuf[UTF8_MAXLEN]; + U8 tmpbuf[UTF8_MAXLEN+1]; U8 *tend; UV uv = utf8_to_uv(s, slen, &ulen, 0); @@ -2380,7 +2380,7 @@ PP(pp_lcfirst) if (DO_UTF8(sv) && (s = (U8*)SvPV(sv, slen)) && slen && (*s & 0xc0) == 0xc0) { STRLEN ulen; - U8 tmpbuf[UTF8_MAXLEN]; + U8 tmpbuf[UTF8_MAXLEN+1]; U8 *tend; UV uv = utf8_to_uv(s, slen, &ulen, 0); @@ -4727,7 +4727,7 @@ PP(pp_pack) while (len-- > 0) { fromstr = NEXTFROM; auint = SvUV(fromstr); - SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN); + SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1); SvCUR_set(cat, (char*)uv_to_utf8((U8*)SvEND(cat),auint) - SvPVX(cat)); } |