summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-06-22 21:39:01 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-06-22 21:39:01 (GMT)
commitb91e3875cce9b06a7dc6435a374ffff17d92fd4f (patch)
tree5e8f4821e729679450cb18a4ba72ebf9c7b30e4a
parentd7229892af744003cde6528dd33e3796bb4a6278 (diff)
downloadtcl-b91e3875cce9b06a7dc6435a374ffff17d92fd4f.zip
tcl-b91e3875cce9b06a7dc6435a374ffff17d92fd4f.tar.gz
tcl-b91e3875cce9b06a7dc6435a374ffff17d92fd4f.tar.bz2
bug 1225044
-rw-r--r--ChangeLog2
-rw-r--r--win/tclWinPipe.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a52b62e..67af0c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@
PipeCloseProc2 would re-establish the exit handler after
exit handlers had already run, corrupting the heap.
[Bug #1225727]
+ Also corrected a potential read of uninitialized memory in
+ PipeClose2Proc [Bug #1225044]
2005-06-21 Andreas Kupries <andreask@activestate.com>
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 8782f5e..fc4a3c1 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPipe.c,v 1.56 2005/06/22 19:48:11 kennykb Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.57 2005/06/22 21:39:01 kennykb Exp $
*/
#include "tclWinInt.h"
@@ -2068,8 +2068,13 @@ PipeClose2Proc(
Tcl_ReapDetachedProcs();
if (pipePtr->errorFile) {
- TclpCloseFile(pipePtr->errorFile);
+ if (TclpCloseFile(pipePtr->errorFile) != 0) {
+ if ( errorCode == 0 ) {
+ errorCode = errno;
+ }
+ }
}
+ result = 0;
} else {
/*
* Wrap the error file into a channel and give it to the cleanup