Subject: Re: [perl #27530] Regex qr// interpolation fails when chr(0) is used in a thread
Message-Id: <
200403111621.i2BGLoi20225@zen.crypt.org>
(plus another similar fix)
p4raw-id: //depot/perl@22490
New(0, ret->offsets, 2*len+1, U32);
Copy(r->offsets, ret->offsets, 2*len+1, U32);
- ret->precomp = SAVEPV(r->precomp);
+ ret->precomp = SAVEPVN(r->precomp, r->prelen);
ret->refcnt = r->refcnt;
ret->minlen = r->minlen;
ret->prelen = r->prelen;
ret->sublen = r->sublen;
if (RX_MATCH_COPIED(ret))
- ret->subbeg = SAVEPV(r->subbeg);
+ ret->subbeg = SAVEPVN(r->subbeg, r->sublen);
else
ret->subbeg = Nullch;
#ifdef PERL_COPY_ON_WRITE