mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-20 09:01:36 -08:00
Fix out-of-bounds writing to browser messages
This commit is contained in:
1 parent
dfdd561fc5
commit
80e68bb4e8
8 files changed
+591
-74
No files matched your search
@@ -93,10 +93,10 @@ void NativeMessagingProxy::setupLocalSocket()
|
||||
{
|
||||
m_localSocket.reset(new QLocalSocket());
|
||||
m_localSocket->connectToServer(BrowserShared::localServerPath());
|
||||
m_localSocket->setReadBufferSize(BrowserShared::NATIVEMSG_MAX_LENGTH);
|
||||
m_localSocket->setReadBufferSize(BrowserShared::SOCKET_BUFFER_SIZE);
|
||||
int socketDesc = m_localSocket->socketDescriptor();
|
||||
if (socketDesc) {
|
||||
int max = BrowserShared::NATIVEMSG_MAX_LENGTH;
|
||||
int max = BrowserShared::SOCKET_BUFFER_SIZE;
|
||||
setsockopt(socketDesc, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&max), sizeof(max));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user