]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
Fix an off-by-one error when allocating the parens buffer rt38684
authorVincent Pit <vince@profvince.com>
Sat, 22 Aug 2009 23:26:09 +0000 (01:26 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 22 Aug 2009 23:26:09 +0000 (01:26 +0200)
This fixes [perl #38684]: test failures in t/method/mod.t

Plugin.xs

index 8486171a3cd74f3558066b8aa89386400e356f58..2ebc28deebb9c3be4afe92773fcc1aaaec4efc23 100644 (file)
--- 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;
 }