summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-01-11 21:42:07 +0000
committerDavid Mitchell <davem@iabyn.com>2010-01-12 00:26:59 +0000
commit0097b436152452e403cc71b4f1a1cfd30ec0ba1a (patch)
treed6bb18f919943ff444a63594a5ff6d249df5b0c0 /mg.c
parentd57ccc9acbe96c9956c5e636e8be87a590449add (diff)
downloadperl-0097b436152452e403cc71b4f1a1cfd30ec0ba1a.tar.gz
fix for [perl #61976] Errno ($!) not evaluated to a error message string
(5.10.0 in taint mode) Change 27176 / 2a509ed3c095f7d712013e653f68821f6bb2d6db fixed a taint bug, which as a side effect, meant that $! used within a tainted expression failed to have a string value. This quick fix just makes sure the POK flag is set (prior to it being shifted back to pPOK).
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index fb913259fd..ddfc2ff2fa 100644
--- a/mg.c
+++ b/mg.c
@@ -1048,6 +1048,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
else
#endif
sv_setpv(sv, errno ? Strerror(errno) : "");
+ SvPOK_on(sv); /* may have got removed during taint processing */
RESTORE_ERRNO;
}
#endif