summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-04-08 19:59:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-04-08 19:59:03 (GMT)
commitb33c30f98bfe09a38ef7a2106610e2d0d0605a45 (patch)
tree66cc82c126d9de0e6ce6bc9579d76026b029826b /tests
parentba5ae0ab74c4217f0a951b0eb3edf223022af5c5 (diff)
parente62eab9118e1460d3afe28e01dc2b83bbb63194c (diff)
downloadtcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.zip
tcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.tar.gz
tcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.tar.bz2
3610026 Stop crash when the number of "colors" in a regular expression
overflows a short int. Thanks to Heikki Linnakangas for the report and the patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/regexp.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 73c0edf..8138054 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -717,6 +717,17 @@ test regexp-22.4 {Bug 3606139} -setup {
} -cleanup {
rename a {}
} -returnCodes 1 -result {couldn't compile regular expression pattern: nfa has too many states}
+test regexp-22.5 {Bug 3610026} -setup {
+ set e {}
+ set cp 99
+ while {$cp < 32864} {
+ append e [format %c [incr cp]]
+ }
+} -body {
+ regexp -about $e
+} -cleanup {
+ unset -nocomplain e cp
+} -returnCodes error -match glob -result {*too many colors*}
test regexp-23.1 {regexp -all and -line} {
set string ""