summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2013-04-08 19:45:55 (GMT)
committerdgp@users.sourceforge.net <dgp>2013-04-08 19:45:55 (GMT)
commitf77d9ac44965ff3869aaf9136cb176def9adedc3 (patch)
tree88b8c204f46260baa9bc76dda0d1b56189e75472 /tests/regexp.test
parent1d0f17db3acee74ef0db9225931aeab6c33bbf66 (diff)
parenta4b9bc445b93071e1b5bff03860263aa7a5e5f15 (diff)
downloadtcl-f77d9ac44965ff3869aaf9136cb176def9adedc3.zip
tcl-f77d9ac44965ff3869aaf9136cb176def9adedc3.tar.gz
tcl-f77d9ac44965ff3869aaf9136cb176def9adedc3.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/regexp.test')
-rw-r--r--tests/regexp.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 9b4c525..5328c8e 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -679,6 +679,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*}
# cleanup
::tcltest::cleanupTests