diff options
author | Larry Wall <larry@wall.org> | 1998-08-07 07:42:43 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-08-08 22:45:06 +0000 |
commit | a5a20234c16adf3662345bdfd872d14c28021bc0 (patch) | |
tree | b3d1f0aa851ef56a868432b0f797b6502d34d4f1 /pp.c | |
parent | d1c2b58ac830663c9c79b4948c8989557cac76b8 (diff) | |
download | perl-a5a20234c16adf3662345bdfd872d14c28021bc0.tar.gz |
fix double free on -Mutf8 -e '$b=uc("")'
Message-Id: <199808072142.OAA14920@wall.org>
Subject: [PATCH 5.005_50]: uc("") and lc("") under utf8 fails
p4raw-id: //depot/perl@1769
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2281,8 +2281,11 @@ PP(pp_uc) U8 *send; s = SvPV(sv,len); - if (!len) + if (!len) { + sv_setpvn(TARG, "", 0); + SETs(TARG); RETURN; + } (void)SvUPGRADE(TARG, SVt_PV); SvGROW(TARG, (len * 2) + 1); @@ -2348,8 +2351,11 @@ PP(pp_lc) U8 *send; s = SvPV(sv,len); - if (!len) + if (!len) { + sv_setpvn(TARG, "", 0); + SETs(TARG); RETURN; + } (void)SvUPGRADE(TARG, SVt_PV); SvGROW(TARG, (len * 2) + 1); |