From: Vincent Pit Date: Sat, 22 Aug 2009 23:26:09 +0000 (+0200) Subject: Fix an off-by-one error when allocating the parens buffer X-Git-Tag: rt38684^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=08a530304d4173611ea49823baeb3ec158024630;p=perl%2Fmodules%2Fre-engine-Plugin.git Fix an off-by-one error when allocating the parens buffer This fixes [perl #38684]: test failures in t/method/mod.t --- diff --git a/Plugin.xs b/Plugin.xs index 8486171..2ebc28d 100644 --- a/Plugin.xs +++ b/Plugin.xs @@ -110,7 +110,7 @@ Plugin_comp(pTHX_ const SV * const pattern, const U32 flags) buffers = rx->nparens; - Newxz(rx->offs, buffers, regexp_paren_pair); + Newxz(rx->offs, buffers + 1, regexp_paren_pair); return rx; }