diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | win/tclWinSock.c | 6 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2007-11-29 Don Porter <dgp@users.sourceforge.net> + + * generic/tclWinSock.c (InitializeHostName): Correct error in + buffer length tracking. After gethostname() writes into a buffer, + convert only the written string to internal encoding, not the + whole buffer. + 2007-11-28 Don Porter <dgp@users.sourceforge.net> * generic/tclConfig.c: Corrected failure of the [::foo::pkgconfig] diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 1d61eb6..99300d6 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.58 2007/11/27 20:38:40 dgp Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.59 2007/11/29 18:00:20 dgp Exp $ */ #include "tclWinInt.h" @@ -2584,8 +2584,8 @@ InitializeHostName( Tcl_DStringLength(&inDs)) == 0) { Tcl_DStringSetLength(&ds, 0); } else { - Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&inDs), - Tcl_DStringLength(&inDs), &ds); + Tcl_ExternalToUtfDString(NULL, + Tcl_DStringValue(&inDs), -1, &ds); } Tcl_DStringFree(&inDs); } |