diff options
author | chengyemao <chengyemao> | 2003-02-27 03:47:09 (GMT) |
---|---|---|
committer | chengyemao <chengyemao> | 2003-02-27 03:47:09 (GMT) |
commit | 55cced878e6ab5b0f8ef53b039bb9e8998a035d2 (patch) | |
tree | d86d66837b07e02dff13c7eb4e641239b123512a /win/tclWinInit.c | |
parent | bd16122f49a7f12106eec64689e932e06750ecee (diff) | |
download | tcl-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.c | 4 |
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); |