diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-02-05 21:47:35 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-02-05 21:47:35 +0000 |
commit | 26866f99b421a0fa48720d3ab1c6664d3cde4a59 (patch) | |
tree | 87f8130f816ebebe1ebb001ae0b05fa9db5a495a /util.c | |
parent | 558fa1e8b99b11f5445685a5adf1b526ab9c0803 (diff) | |
download | perl-26866f99b421a0fa48720d3ab1c6664d3cde4a59.tar.gz |
With mallocwrap New() evaluates its arguments more than once, so they
had better not have any side effects.
:-(
p4raw-id: //depot/perl@23941
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |