summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-03 20:57:19 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-03 20:57:19 +0000
commitad391ad9bbfeaf73d3944b50240313a5677bcc60 (patch)
tree270b2e4acd993a5e6c9721113cd4130e6ca64f4e /regexec.c
parent801ca9cd5af7c86da741a601b4721bff3f94f9cd (diff)
downloadperl-ad391ad9bbfeaf73d3944b50240313a5677bcc60.tar.gz
Make uv_to_utf8() to zero-terminate its output buffer,
always use (at least) UTF8_MAXLEN + 1 U8s deep buffer. p4raw-id: //depot/perl@7967
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 18c06d553f..1f79f3000a 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3795,7 +3795,7 @@ S_reginclassutf8(pTHX_ regnode *f, U8 *p)
if (swash_fetch(sv, p))
match = TRUE;
else if (flags & ANYOF_FOLD) {
- U8 tmpbuf[UTF8_MAXLEN];
+ U8 tmpbuf[UTF8_MAXLEN+1];
if (flags & ANYOF_LOCALE) {
PL_reg_flags |= RF_tainted;
uv_to_utf8(tmpbuf, toLOWER_LC_utf8(p));