summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-06-22 18:10:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-06-22 18:10:17 (GMT)
commit4b86a7eea52d42b1390234fb9b710fad125d58a0 (patch)
tree540197ec58e95cf6325836ad73fee3aa8720a20f
parentf8da4262bfb61ab52c15ca76b3211eec99fd79f3 (diff)
parent4468bc4cb1e0e653f7602d9333640b5f6a9fbcf0 (diff)
downloadtk-4b86a7eea52d42b1390234fb9b710fad125d58a0.zip
tk-4b86a7eea52d42b1390234fb9b710fad125d58a0.tar.gz
tk-4b86a7eea52d42b1390234fb9b710fad125d58a0.tar.bz2
[787adc5ed7] Workaround potential crash in Tcl_DStringAppend.
-rw-r--r--generic/tkWindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index b5cbbab..9977ac5 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3198,7 +3198,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 {