From 55cced878e6ab5b0f8ef53b039bb9e8998a035d2 Mon Sep 17 00:00:00 2001 From: chengyemao Date: Thu, 27 Feb 2003 03:47:09 +0000 Subject: Fixed a bug in TclpSetVeriables: initialize dwUserNameLen to avoid crash in calling GetUserName --- win/tclWinInit.c | 4 ++-- 1 file 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); -- cgit v0.12