summaryrefslogtreecommitdiffstats
path: root/tests/menu.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-11-24 18:11:32 (GMT)
committerhobbs <hobbs>2006-11-24 18:11:32 (GMT)
commit97b9a81b9a7c013a7e2f45ec81b6767f7055b467 (patch)
treeaab98b52e367e849ad905fb7d36fa77422732416 /tests/menu.test
parenta3220fdf64e35fe118d44af78a8d9582b416fbd7 (diff)
downloadtk-97b9a81b9a7c013a7e2f45ec81b6767f7055b467.zip
tk-97b9a81b9a7c013a7e2f45ec81b6767f7055b467.tar.gz
tk-97b9a81b9a7c013a7e2f45ec81b6767f7055b467.tar.bz2
* unix/tkUnixMenu.c (DrawMenuUnderline): bound Tcl_UtfAtIndex usage
* tests/menu.test (menu-36.1): [Bug 1599877]
Diffstat (limited to 'tests/menu.test')
-rw-r--r--tests/menu.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/menu.test b/tests/menu.test
index 15d055a..24e57cc 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -5,7 +5,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: menu.test,v 1.18 2006/03/20 15:27:47 dkf Exp $
+# RCS: @(#) $Id: menu.test,v 1.19 2006/11/24 18:11:32 hobbs Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -2493,6 +2493,16 @@ test menu-35.1 {menus on multiple screens - crashes tk8.3.1, Bug 5454} \
destroy .two
} {}
+test menu-36.1 {menu -underline string overruns Bug 1599877} {} {
+ # ensure that -underline does not do string overruns [Bug 1599877]
+ catch {destroy .m}
+ menu .m
+ .m add command -label "File" -underline [expr {1<<30}]
+ . configure -menu .m
+ update
+ tk::TraverseToMenu . "e"
+} {}
+
# cleanup
deleteWindows
cleanupTests