diff options
author | dgp <dgp@users.sourceforge.net> | 2005-06-22 21:23:32 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-06-22 21:23:32 (GMT) |
commit | 84af1814b20547d7a009bf91c11e11eb572ef724 (patch) | |
tree | c0ebc21293c9ff9199b6fc9f299e1f1112e75dea | |
parent | c020600660d7f30a3cf6a153883cfaa7364ffa8c (diff) | |
download | tcl-84af1814b20547d7a009bf91c11e11eb572ef724.zip tcl-84af1814b20547d7a009bf91c11e11eb572ef724.tar.gz tcl-84af1814b20547d7a009bf91c11e11eb572ef724.tar.bz2 |
* win/tclWinFile.c: Potential buffer overflow. [Bug 1225571]
Thanks to Pat Thoyts for discovery and fix.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | win/tclWinFile.c | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -22,6 +22,9 @@ 2005-06-22 Don Porter <dgp@users.sourceforge.net> + * win/tclWinFile.c: Potential buffer overflow. [Bug 1225571] + Thanks to Pat Thoyts for discovery and fix. + * tests/safe.test: Backport performance improvement from reduced $::auto_path. diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 18c4787..d58fa35 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.11 2005/03/15 18:08:24 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.12 2005/06/22 21:23:33 dgp Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -2085,7 +2085,7 @@ TclpFilesystemPathType(pathObjPtr) { #define VOL_BUF_SIZE 32 int found; - char volType[VOL_BUF_SIZE]; + WCHAR volType[VOL_BUF_SIZE]; char* firstSeparator; CONST char *path; @@ -2114,7 +2114,7 @@ TclpFilesystemPathType(pathObjPtr) Tcl_DString ds; Tcl_Obj *objPtr; - Tcl_WinTCharToUtf(volType, -1, &ds); + Tcl_WinTCharToUtf((CONST char *)volType, -1, &ds); objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds),Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); return objPtr; |