SSH Agent: Fix CreateFileMappingA Parameter (#8619)

The last argument of CreateFileMappingA is of type string.
This commit is contained in:
YAMASAKI Masahide 2022-10-28 17:51:27 +09:00 committed by GitHub
parent ef51065c98
commit 91fafccb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,7 +211,7 @@ bool SSHAgent::sendMessagePageant(const QByteArray& in, QByteArray& out)
}
QByteArray mapName =
(QString("SSHAgentRequest") + reinterpret_cast<intptr_t>(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());