From: Nicholas Clark Date: Sat, 5 Feb 2005 21:47:35 +0000 (+0000) Subject: With mallocwrap New() evaluates its arguments more than once, so they X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26866f99b421a0fa48720d3ab1c6664d3cde4a59;p=p5sagit%2Fp5-mst-13.2.git With mallocwrap New() evaluates its arguments more than once, so they had better not have any side effects. :-( p4raw-id: //depot/perl@23941 --- diff --git a/util.c b/util.c index 85ae19f..e90d195 100644 --- a/util.c +++ b/util.c @@ -835,7 +835,8 @@ Perl_savesvpv(pTHX_ SV *sv) const char *pv = SvPV(sv, len); register char *newaddr; - New(903,newaddr,++len,char); + ++len; + New(903,newaddr,len,char); return CopyD(pv,newaddr,len,char); }