From: Jarkko Hietaniemi Date: Mon, 7 Aug 2000 14:45:14 +0000 (+0000) Subject: tr memory corruption fix from Simon Cozens. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdbb8cbde311423021cac075eca818cc6b8ae2e4;p=p5sagit%2Fp5-mst-13.2.git tr memory corruption fix from Simon Cozens. p4raw-id: //depot/perl@6535 --- diff --git a/doop.c b/doop.c index ba8a7e5..39d050b 100644 --- a/doop.c +++ b/doop.c @@ -93,8 +93,8 @@ S_do_trans_simple(pTHX_ SV *sv) } *d = '\0'; sv_setpvn(sv, (const char*)dstart, d - dstart); + Safefree(dstart); SvUTF8_on(sv); - SvLEN_set(sv, 2*len+1); SvSETMAGIC(sv); return matches; }