summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-03-01 18:47:10 -0700
committerKarl Williamson <public@khwilliamson.com>2014-03-01 20:12:17 -0700
commit251b239f638a40fdf052716f0d8512fd4122ec8c (patch)
tree83dae08c28282e954d1662a37acc36bb02e4ad5c /regen
parentdfcc68435715892f04adad257c3a85458300f1f2 (diff)
downloadperl-251b239f638a40fdf052716f0d8512fd4122ec8c.tar.gz
Revert most of 3a8bbffbce: Avoid unnecessary malformed checking
My thinking was muddled when I made that commit, and this reverts the essence of it. The theory was that since we have already processed the regex pattern, we don't need to check it for malformedness, hence we don't need the "safe" form of certain macros that check for and avoid running off the end of the buffer. It is true that we don't have to worry about malformedness indicating that the buffer is bigger than it really is, but these macros can match up to three well-formed characters, so we do have to make sure that all three are in the buffer, and that the input isn't just the first two at the buffer's end. This was caught by running valgrind.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/regcharclass.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index 10e95040dc..f7422bf5fa 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1618,14 +1618,14 @@ QUOTEMETA: Meta-characters that \Q should quote
\p{_Perl_Quotemeta}
MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character
-=> UTF8 :fast
+=> UTF8 :safe
do regen/regcharclass_multi_char_folds.pl
# 1 => All folds
&regcharclass_multi_char_folds::multi_char_folds(1)
MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character
-=> LATIN1 :fast
+=> LATIN1 : safe
&regcharclass_multi_char_folds::multi_char_folds(0)
# 0 => Latin1-only