diff options
-rw-r--r-- | doop.c | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | pp.c | 6 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | sv.c | 2 |
7 files changed, 9 insertions, 9 deletions
@@ -282,7 +282,7 @@ S_do_trans_CU_simple(pTHX_ SV *sv) UV extra = none + 1; UV final; UV uv; - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; I32 bits = 16; s = (U8*)SvPV(sv, len); @@ -2607,7 +2607,7 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) I32 to_utf = o->op_private & OPpTRANS_TO_UTF; if (complement) { - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; U8** cp; UV nextmin = 0; New(1109, cp, tlen, U8*); @@ -220,7 +220,7 @@ perl_construct(pTHXx) PL_patchlevel = NEWSV(0,4); SvUPGRADE(PL_patchlevel, SVt_PVNV); if (PERL_REVISION > 127 || PERL_VERSION > 127 || PERL_SUBVERSION > 127) - SvGROW(PL_patchlevel,24); + SvGROW(PL_patchlevel, UTF8_MAXLEN*3+1); s = (U8*)SvPVX(PL_patchlevel); s = uv_to_utf8(s, (UV)PERL_REVISION); s = uv_to_utf8(s, (UV)PERL_VERSION); @@ -2254,7 +2254,7 @@ PP(pp_ucfirst) if (DO_UTF8(sv) && (s = (U8*)SvPV(sv, slen)) && slen && (*s & 0xc0) == 0xc0) { I32 ulen; - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; U8 *tend; UV uv = utf8_to_uv(s, &ulen); @@ -2313,7 +2313,7 @@ PP(pp_lcfirst) if (DO_UTF8(sv) && (s = (U8*)SvPV(sv, slen)) && slen && (*s & 0xc0) == 0xc0) { I32 ulen; - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; U8 *tend; UV uv = utf8_to_uv(s, &ulen); @@ -4645,7 +4645,7 @@ PP(pp_pack) while (len-- > 0) { fromstr = NEXTFROM; auint = SvUV(fromstr); - SvGROW(cat, SvCUR(cat) + 10); + SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN); SvCUR_set(cat, (char*)uv_to_utf8((U8*)SvEND(cat),auint) - SvPVX(cat)); } @@ -3646,7 +3646,7 @@ S_reguni(pTHX_ UV uv, char* s, I32* lenp) { dTHR; if (SIZE_ONLY) { - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; *lenp = uv_to_utf8(tmpbuf, uv) - tmpbuf; } else @@ -3610,7 +3610,7 @@ S_reginclassutf8(pTHX_ regnode *f, U8 *p) match = TRUE; else if (flags & ANYOF_FOLD) { I32 cf; - U8 tmpbuf[10]; + U8 tmpbuf[UTF8_MAXLEN]; if (flags & ANYOF_LOCALE) { PL_reg_flags |= RF_tainted; uv_to_utf8(tmpbuf, toLOWER_LC_utf8(p)); @@ -5741,7 +5741,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV bool is_utf = FALSE; char esignbuf[4]; - U8 utf8buf[10]; + U8 utf8buf[UTF8_MAXLEN]; STRLEN esignlen = 0; char *eptr = Nullch; |