summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-02-01 14:34:16 +1100
committerTony Cook <tony@develop-help.com>2017-02-01 14:34:16 +1100
commitdc0dad9b91adb09c774c7248bc91a44b7a777d4d (patch)
treea8c34ae1ca82a8db8daa5d93b43ae0071f11b68d /regcomp.c
parent6b9660cae39cc0ce59738753e42153cb3be530c7 (diff)
downloadperl-dc0dad9b91adb09c774c7248bc91a44b7a777d4d.tar.gz
(perl #130684) allocate enough space for the extra 'x'
77c8f26370dcc0e added support for a doubled x regexp flags, and ensured the doubled flag was passed to the qr// created by S_compile_runtime_code(). Unfortunately it didn't ensure enough space was allocated for that extra 'x'.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 0a315cbdbc..660be76858 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6526,7 +6526,7 @@ S_compile_runtime_code(pTHX_ RExC_state_t * const pRExC_state,
int n = 0;
STRLEN s;
char *p, *newpat;
- int newlen = plen + 6; /* allow for "qr''x\0" extra chars */
+ int newlen = plen + 7; /* allow for "qr''xx\0" extra chars */
SV *sv, *qr_ref;
dSP;