summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-11-24 18:11:54 (GMT)
committerhobbs <hobbs>2006-11-24 18:11:54 (GMT)
commit2856aaa6a3f606efaf050b719a91763b9abbf0f5 (patch)
treef4cdeee107ef79f75ddfe6685b0f10eb03a0b3f2 /tests
parent27d876771306fb31e6d4db872630bf4a3a3c17d0 (diff)
downloadtk-2856aaa6a3f606efaf050b719a91763b9abbf0f5.zip
tk-2856aaa6a3f606efaf050b719a91763b9abbf0f5.tar.gz
tk-2856aaa6a3f606efaf050b719a91763b9abbf0f5.tar.bz2
* unix/tkUnixMenu.c (DrawMenuUnderline): bound Tcl_UtfAtIndex usage
* tests/menu.test (menu-36.1): [Bug 1599877]
Diffstat (limited to 'tests')
-rw-r--r--tests/menu.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/menu.test b/tests/menu.test
index ed60a38..c9d33a9 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.13.2.1 2003/07/15 13:59:06 vincentdarley Exp $
+# RCS: @(#) $Id: menu.test,v 1.13.2.2 2006/11/24 18:11:54 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -2486,6 +2486,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
::tcltest::cleanupTests