summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index d19ab695ea..bd2ca4c325 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -82,7 +82,8 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
forever {
// ### The user must make sure to call qsrand() to make the pipe names less predictable.
// ### Replace the call to qrand() with a secure version, once we have it in Qt.
- swprintf(pipeName, L"\\\\.\\pipe\\qt-%X", qrand());
+ _snwprintf(pipeName, sizeof(pipeName) / sizeof(pipeName[0]),
+ L"\\\\.\\pipe\\qt-%X", qrand());
DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT;
if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)