diff options
author | Tony Cook <tony@develop-help.com> | 2020-11-17 14:07:32 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2020-11-24 13:35:21 +1100 |
commit | 18b3ff2673bbc5f9b37c6d9b6c912f882537ddc2 (patch) | |
tree | 5e2170865e06ed9b8fc616e9456e333a1dcf9b33 /doio.c | |
parent | 617613e2415f6e65538efd1001089b567bdff5ad (diff) | |
download | perl-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |