diff options
author | dgp <dgp@users.sourceforge.net> | 2013-04-08 20:07:07 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-04-08 20:07:07 (GMT) |
commit | 1ba9a90c6e8c7c639399891e60cdc5a09c0f0acd (patch) | |
tree | 95837b1887eda849b2873c00caaf5337bbfc18dd /tests/regexp.test | |
parent | 93b8f2696af89601f0c9f980088df04bfef5d593 (diff) | |
parent | 55102c2b83a91074eb32c07fb5930ccc9ca00c44 (diff) | |
download | tcl-1ba9a90c6e8c7c639399891e60cdc5a09c0f0acd.zip tcl-1ba9a90c6e8c7c639399891e60cdc5a09c0f0acd.tar.gz tcl-1ba9a90c6e8c7c639399891e60cdc5a09c0f0acd.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.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test index 2d2814a..1c30001 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -865,6 +865,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 "" |