summaryrefslogtreecommitdiff
path: root/ext/PerlIO
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-23 14:11:20 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-23 14:11:20 +0000
commit94010e71b67db04027249ff69e2a2bfa9a050945 (patch)
tree3288295ac02b3ed67238e92114987299ead8ffc3 /ext/PerlIO
parent771ba71a7bf3673decf297992c8591f2ff873802 (diff)
downloadperl-94010e71b67db04027249ff69e2a2bfa9a050945.tar.gz
Add a define PERL_POISON which tries to trip up anything accessing
freed or uninitialised memory. Currently only Poison()s freed pointers. p4raw-id: //depot/perl@24959
Diffstat (limited to 'ext/PerlIO')
-rw-r--r--ext/PerlIO/encoding/encoding.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/PerlIO/encoding/encoding.xs b/ext/PerlIO/encoding/encoding.xs
index 125978bb80..d4b47cf612 100644
--- a/ext/PerlIO/encoding/encoding.xs
+++ b/ext/PerlIO/encoding/encoding.xs
@@ -309,7 +309,7 @@ PerlIOEncode_fill(pTHX_ PerlIO * f)
else {
/* Create a "dummy" SV to represent the available data from layer below */
if (SvLEN(e->dataSV) && SvPVX_const(e->dataSV)) {
- Safefree(SvPVX_const(e->dataSV));
+ Safefree(SvPVX_mutable(e->dataSV));
}
if (use > (SSize_t)e->base.bufsiz) {
if (e->flags & NEEDS_LINES) {