]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/blobdiff - Plugin.xs
Fix an off-by-one error when allocating the parens buffer
[perl/modules/re-engine-Plugin.git] / 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;
 }