X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/aa058ea4938983be8517ca4ac1dbcdf62cd96da2..1d6cadf136bf2c85058a5359fb48b09b3ea9fe6f:/doio.c diff --git a/doio.c b/doio.c index aa6c35b..439f2d0 100644 --- a/doio.c +++ b/doio.c @@ -3141,6 +3141,7 @@ Perl_do_msgrcv(pTHX_ SV **mark, SV **sp) } if (ret >= 0) { SvCUR_set(mstr, sizeof(long)+ret); + SvPOK_only(mstr); *SvEND(mstr) = '\0'; /* who knows who has been playing with this message? */ SvTAINTED_on(mstr); @@ -3250,7 +3251,7 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) else { STRLEN len; - const char *mbuf = SvPV_const(mstr, len); + const char *mbuf = SvPVbyte(mstr, len); const I32 n = ((I32)len > msize) ? msize : (I32)len; Copy(mbuf, shm + mpos, n, char); if (n < msize)