diff options
author | dgp@users.sourceforge.net <dgp> | 2012-07-02 16:22:18 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2012-07-02 16:22:18 (GMT) |
commit | 0e1fcf44a26d976fed05402efdca880bf0d1b0fa (patch) | |
tree | a55b666665dee68835dc95f84554c3895f1cbcb2 /unix/tclUnixPipe.c | |
parent | 723f3e79fbc0fccb808b6daa8a07b9904d5bf7d5 (diff) | |
download | tcl-0e1fcf44a26d976fed05402efdca880bf0d1b0fa.zip tcl-0e1fcf44a26d976fed05402efdca880bf0d1b0fa.tar.gz tcl-0e1fcf44a26d976fed05402efdca880bf0d1b0fa.tar.bz2 |
1189293 Make '<<' redirects binary safe. Don't use strlen() (or equivalent)
to find end of written data bytes.
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r-- | unix/tclUnixPipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 3a4005c..829a4a6 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -213,7 +213,7 @@ TclpCreateTempFile(contents) if (contents != NULL) { native = Tcl_UtfToExternalDString(NULL, contents, -1, &dstring); - if (write(fd, native, strlen(native)) == -1) { + if (write(fd, native, Tcl_DStringLength(&dstring)) == -1) { close(fd); Tcl_DStringFree(&dstring); return NULL; |