summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2005-01-22 02:20:12 +0200
committerDave Mitchell <davem@fdisolutions.com>2005-01-22 00:17:40 +0000
commit89ebb4a3f2a55825eeed13aaf58db5c73d2140ef (patch)
treea66444144493fa61d6befce0c9bf1358973f9872 /pp_pack.c
parent80a13697042a4d823de61ba24b77aa9d893765d6 (diff)
downloadperl-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 815c326ffa..2e830f40f3 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -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,