diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 6bf1b9b1a0..abfdfc8c82 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -669,7 +669,7 @@ failChildProcess(const QProcessPrivate *d, const char *description, int code) no { ChildError error = {}; error.code = code; - strncpy(error.function, description, sizeof(error.function)); + qstrncpy(error.function, description, sizeof(error.function)); qt_safe_write(d->childStartedPipe[1], &error, sizeof(error)); _exit(-1); }