From 91fafccb0a238254b59f0ecc0dad6156f39ab7b7 Mon Sep 17 00:00:00 2001 From: YAMASAKI Masahide Date: Fri, 28 Oct 2022 17:51:27 +0900 Subject: [PATCH] SSH Agent: Fix CreateFileMappingA Parameter (#8619) The last argument of CreateFileMappingA is of type string. --- src/sshagent/SSHAgent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sshagent/SSHAgent.cpp b/src/sshagent/SSHAgent.cpp index 2aff5f4cb..331ee99ba 100644 --- a/src/sshagent/SSHAgent.cpp +++ b/src/sshagent/SSHAgent.cpp @@ -211,7 +211,7 @@ bool SSHAgent::sendMessagePageant(const QByteArray& in, QByteArray& out) } QByteArray mapName = - (QString("SSHAgentRequest") + reinterpret_cast(QThread::currentThreadId())).toLatin1(); + (QString("SSHAgentRequest%1").arg(int(QThread::currentThreadId()), 8, 16, QChar('0'))).toLatin1(); HANDLE handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, AGENT_MAX_MSGLEN, mapName.data());