diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-01-22 13:33:12 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-01-22 18:27:58 +0000 |
commit | 32c480af8dfd9e34b5575597dcf51e893e97e167 (patch) | |
tree | f36569e9cc2309160fbdca2b33249c5ddb1303f6 /pp.c | |
parent | 61ba5045923c2764dd186c0e8c1f665460baf428 (diff) | |
download | perl-32c480af8dfd9e34b5575597dcf51e893e97e167.tar.gz |
Re: uc($long_utf8_string) exhausts memory
Message-Id: <41F21DD8.3050500@iki.fi>
change #23857 miscalculated the SvGROW size
p4raw-link: @23857 on //depot/perl: 89ebb4a3f2a55825eeed13aaf58db5c73d2140ef
p4raw-id: //depot/perl@23863
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -3597,9 +3597,9 @@ PP(pp_uc) /* If someone uppercases one million U+03B0s we * SvGROW() one million times. Or we could try - * guess how much to allocate without overdoing. - * Such is life. */ - SvGROW(TARG, SvCUR(TARG) + ulen - u); + * guessing how much to allocate without allocating + * too much. Such is life. */ + SvGROW(TARG, SvLEN(TARG) + ulen - u); d = (U8*)SvPVX(TARG) + o; } Copy(tmpbuf, d, ulen, U8); @@ -3695,9 +3695,9 @@ PP(pp_lc) /* If someone lowercases one million U+0130s we * SvGROW() one million times. Or we could try - * guess how much to allocate without overdoing. - Such is life. */ - SvGROW(TARG, SvCUR(TARG) + ulen - u); + * guessing how much to allocate without allocating. + * too much. Such is life. */ + SvGROW(TARG, SvLEN(TARG) + ulen - u); d = (U8*)SvPVX(TARG) + o; } Copy(tmpbuf, d, ulen, U8); |