diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 22:22:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 22:22:32 (GMT) |
commit | feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0 (patch) | |
tree | 196f438c5ba746829c249ad28e10c94a4a44ee0c /unix/tclUnixPipe.c | |
parent | 67ced520761d9c2dff0022dafbebdb996e20b551 (diff) | |
parent | ed24f448c79bc5af4c0f6fd77826a6552271dd9c (diff) | |
download | tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.zip tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.gz tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.bz2 |
Merge 8.7
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r-- | unix/tclUnixPipe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 0692df5..19127d2 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -476,7 +476,7 @@ TclpCreateProcess( || (!joinThisError && !SetupStdFile(errorFile, TCL_STDERR)) || (joinThisError && ((dup2(1,2) == -1) || (fcntl(2, F_SETFD, 0) != 0)))) { - sprintf(errSpace, + snprintf(errSpace, sizeof(errSpace), "%dforked process couldn't set up input/output", errno); len = strlen(errSpace); if (len != (size_t) write(fd, errSpace, len)) { @@ -491,7 +491,7 @@ TclpCreateProcess( RestoreSignals(); execvp(newArgv[0], newArgv); /* INTL: Native. */ - sprintf(errSpace, "%dcouldn't execute \"%.150s\"", errno, argv[0]); + snprintf(errSpace, sizeof(errSpace), "%dcouldn't execute \"%.150s\"", errno, argv[0]); len = strlen(errSpace); if (len != (size_t) write(fd, errSpace, len)) { Tcl_Panic("TclpCreateProcess: unable to write to errPipeOut"); @@ -783,7 +783,7 @@ TclpCreateCommandChannel( * natural to use "pipe%d". */ - sprintf(channelName, "file%d", channelId); + snprintf(channelName, sizeof(channelName), "file%d", channelId); statePtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName, statePtr, mode); return statePtr->channel; |