Skip to content

Commit

Permalink
SSH Agent: Fix CreateFileMappingA Parameter (#8619)
Browse files Browse the repository at this point in the history
The last argument of CreateFileMappingA is of type string.
  • Loading branch information
masahide authored and droidmonkey committed Oct 29, 2022
1 parent 0488cf6 commit fcd4312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sshagent/SSHAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit fcd4312

Please sign in to comment.