summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-05-02 14:02:51 +0100
committerRicardo Signes <rjbs@cpan.org>2016-05-03 11:23:03 -0400
commit5f58a6bfe359e4057623eb7db1a92e73495eddb8 (patch)
tree2d80423bd214182ce7073ab8f6a500ec8681a459 /sv.c
parent6bbd724fb7623fb05df66ca5ed83a09511903521 (diff)
downloadperl-5f58a6bfe359e4057623eb7db1a92e73495eddb8.tar.gz
Revert "fix #127855, in Perl_sv_setpvn() we have to overallocate to enable COW"
This reverts commit e19cb11142087974d956f263d24e146b968025d5. This and the previous commit revert the two commits that were an original fix for RT #127855, but which is fixed in a different way in a following commit. See the ticket for more details.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 68df702b56..0200679087 100644
--- a/sv.c
+++ b/sv.c
@@ -4891,7 +4891,7 @@ Perl_sv_setpvn(pTHX_ SV *const sv, const char *const ptr, const STRLEN len)
}
SvUPGRADE(sv, SVt_PV);
- dptr = SvGROW(sv, len + 2);
+ dptr = SvGROW(sv, len + 1);
Move(ptr,dptr,len,char);
dptr[len] = '\0';
SvCUR_set(sv, len);