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 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Plugin.git;a=commitdiff_plain;h=refs%2Ftags%2Frt38684 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; }