summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2020-11-17 14:07:32 +1100
committerTony Cook <tony@develop-help.com>2020-11-24 13:35:21 +1100
commit18b3ff2673bbc5f9b37c6d9b6c912f882537ddc2 (patch)
tree5e2170865e06ed9b8fc616e9456e333a1dcf9b33 /doio.c
parent617613e2415f6e65538efd1001089b567bdff5ad (diff)
downloadperl-18b3ff2673bbc5f9b37c6d9b6c912f882537ddc2.tar.gz
*ctl: ensure the ARG parameter's UTF-8 flag is reset
If the SV supplied as ARG had the SVf_UTF8 flag on it would be left on, which would effectively corrupt the returned buffer. Only tested with shmctl(), since the other *ctl() functions only have more complex structures with indeterminate types that would require more effort to test.
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 2bffeea079..11c9ed1a46 100644
--- a/doio.c
+++ b/doio.c
@@ -3058,6 +3058,7 @@ Perl_do_ipcctl(pTHX_ I32 optype, SV **mark, SV **sp)
if (getinfo && ret >= 0) {
SvCUR_set(astr, infosize);
*SvEND(astr) = '\0';
+ SvUTF8_off(astr);
SvSETMAGIC(astr);
}
return ret;