summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2003-02-27 03:47:09 (GMT)
committerchengyemao <chengyemao>2003-02-27 03:47:09 (GMT)
commit55cced878e6ab5b0f8ef53b039bb9e8998a035d2 (patch)
treed86d66837b07e02dff13c7eb4e641239b123512a /win/tclWinInit.c
parentbd16122f49a7f12106eec64689e932e06750ecee (diff)
downloadtcl-55cced878e6ab5b0f8ef53b039bb9e8998a035d2.zip
tcl-55cced878e6ab5b0f8ef53b039bb9e8998a035d2.tar.gz
tcl-55cced878e6ab5b0f8ef53b039bb9e8998a035d2.tar.bz2
Fixed a bug in TclpSetVeriables: initialize dwUserNameLen to avoid crash in calling GetUserName
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index a61d59a..2ab64a3 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.39 2003/02/13 23:49:48 kennykb Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.40 2003/02/27 03:47:09 chengyemao Exp $
*/
#include "tclWinInt.h"
@@ -599,7 +599,7 @@ TclpSetVariables(interp)
OSVERSIONINFOA osInfo;
Tcl_DString ds;
TCHAR szUserName[ UNLEN+1 ];
- DWORD dwUserNameLen;
+ DWORD dwUserNameLen = sizeof(szUserName);
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA(&osInfo);