diff options
author | Gisle Aas <gisle@aas.no> | 2000-02-25 01:24:53 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-02-24 23:46:27 +0000 |
commit | 806e72015c0c16d1c66452a28aa8fd6c6cc967c3 (patch) | |
tree | f8078ff397986a4bceadb65b4ccf79e69d2e9c8e /pp.c | |
parent | 8d220878d77900dc1beb088892237bda615b1719 (diff) | |
download | perl-806e72015c0c16d1c66452a28aa8fd6c6cc967c3.tar.gz |
More UTF8_MAXLEN fixes
To: perl5-porters@perl.org
Message-ID: <m3ema2tc8q.fsf@eik.g.aas.no>
p4raw-id: //depot/cfgperl@5247
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)); } |