summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-06-22 21:24:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-06-22 21:24:00 (GMT)
commitd7229892af744003cde6528dd33e3796bb4a6278 (patch)
tree82bf4ee6a84e503744f0b7c46fb3d903ee548161
parentffaaf5eb1b4fa2ddfffd6cdf8a3668e82fc88ea9 (diff)
downloadtcl-d7229892af744003cde6528dd33e3796bb4a6278.zip
tcl-d7229892af744003cde6528dd33e3796bb4a6278.tar.gz
tcl-d7229892af744003cde6528dd33e3796bb4a6278.tar.bz2
* win/tclWinFile.c: Potential buffer overflow. [Bug 1225571]
Thanks to Pat Thoyts for discovery and fix.
-rw-r--r--ChangeLog5
-rw-r--r--win/tclWinFile.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dfe4bb4..a52b62e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2005-06-22 Kevin Kenny <kennykb@acm.org>
* generic/tclInt.h: Changed the finalization
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index e0ef6b3..d8f1f81 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.74 2005/05/10 18:35:38 kennykb Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.75 2005/06/22 21:24:01 dgp Exp $
*/
//#define _WIN32_WINNT 0x0500
@@ -2284,7 +2284,7 @@ TclpFilesystemPathType(pathPtr)
{
#define VOL_BUF_SIZE 32
int found;
- char volType[VOL_BUF_SIZE];
+ WCHAR volType[VOL_BUF_SIZE];
char* firstSeparator;
CONST char *path;
@@ -2313,7 +2313,7 @@ TclpFilesystemPathType(pathPtr)
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;