From 9373863b490be45da1b823949ebd76425057dd3e Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sun, 24 Jan 2010 12:55:05 +1000 Subject: Fix null pointer dereference If the condition expression of a for statement is invalid --- tests/misc.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/misc.test') diff --git a/tests/misc.test b/tests/misc.test index 3fffbf3..804e456 100644 --- a/tests/misc.test +++ b/tests/misc.test @@ -19,6 +19,16 @@ test regr-1.2 "Reference count shared literals" { return 1 } {1} +test regr-1.3 "Invalid for expression" { + # Crashes with invalid expression + catch { + for {set i 0} {$i < n} {incr i} { + set a(b) $i + set a(c) $i + } + } +} 1 + section "I/O Testing" test io-1.1 "Read last line with no newline" { -- cgit v1.1