diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-01-22 02:20:12 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-01-22 00:17:40 +0000 |
commit | 89ebb4a3f2a55825eeed13aaf58db5c73d2140ef (patch) | |
tree | a66444144493fa61d6befce0c9bf1358973f9872 /pp_pack.c | |
parent | 80a13697042a4d823de61ba24b77aa9d893765d6 (diff) | |
download | perl-89ebb4a3f2a55825eeed13aaf58db5c73d2140ef.tar.gz |
Re: uc($long_utf8_string) exhausts memory
Message-Id: <41F1801C.3080201@iki.fi>
Make buffer size estimates for utf8 case conversion less maximally
pessimistic
p4raw-id: //depot/perl@23857
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2183,7 +2183,7 @@ S_pack_rec(pTHX_ SV *cat, register tempsym_t* symptr, register SV **beglist, SV while (len-- > 0) { fromstr = NEXTFROM; auint = UNI_TO_NATIVE(SvUV(fromstr)); - SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1); + SvGROW(cat, SvCUR(cat) + UTF8_MAXBYTES + 1); SvCUR_set(cat, (char*)uvchr_to_utf8_flags((U8*)SvEND(cat), auint, |