summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-08-19 14:35:29 +1000
committerTony Cook <tony@develop-help.com>2015-08-19 14:35:29 +1000
commit668fcfea69086ab3cf35fc7ba175ea225dbc7f9d (patch)
treec5663378181758f16c92e6f4ea098be00bf68902 /regcomp.c
parent4b06b8deeb339269bad2112a4e6603e43f7bee36 (diff)
downloadperl-668fcfea69086ab3cf35fc7ba175ea225dbc7f9d.tar.gz
[perl #125826] make the buffer large enough in TRIE_STORE_REVCHAR
Since the SV is discarded almost immediately (in non-DEBUGGING builds) don't worry about making it the smallest possible size.
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 f08f08ff4a..4719d12c75 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2001,7 +2001,7 @@ is the recommended Unicode-aware way of saying
#define TRIE_STORE_REVCHAR(val) \
STMT_START { \
if (UTF) { \
- SV *zlopp = newSV(7); /* XXX: optimize me */ \
+ SV *zlopp = newSV(UTF8_MAXBYTES); \
unsigned char *flrbbbbb = (unsigned char *) SvPVX(zlopp); \
unsigned const char *const kapow = uvchr_to_utf8(flrbbbbb, val); \
SvCUR_set(zlopp, kapow - flrbbbbb); \