summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-06-22 17:48:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-06-22 17:48:38 (GMT)
commit4468bc4cb1e0e653f7602d9333640b5f6a9fbcf0 (patch)
treea2761490c7e300266191f3047102845715f39e54 /generic
parentf04872f8ab7961a917d3fe82641f8568f04397ab (diff)
downloadtk-4468bc4cb1e0e653f7602d9333640b5f6a9fbcf0.zip
tk-4468bc4cb1e0e653f7602d9333640b5f6a9fbcf0.tar.gz
tk-4468bc4cb1e0e653f7602d9333640b5f6a9fbcf0.tar.bz2
[787adc5ed7] Workaround potential crash in Tcl_DStringAppend.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkWindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index f2e98e8..4ac2849 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3175,7 +3175,7 @@ Initialize(
TkpGetAppName(interp, &class);
offset = Tcl_DStringLength(&class)+1;
- Tcl_DStringSetLength(&class, offset);
+ Tcl_DStringSetLength(&class, 2*offset);
Tcl_DStringAppend(&class, Tcl_DStringValue(&class), offset-1);
name = Tcl_DStringValue(&class) + offset;
} else {