Subject: [787adc5ed7] Workaround potential crash in Tcl_DStringAppend.

From: dgp <[email-masked]>
Date: Wed, 22 Jun 2016 17:48:38 +0000

---
 generic/tkWindow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
-- 
cgit v0.12