Fix out-of-bounds writing to browser messages

This commit is contained in:
varjolintu authored and Janek Bevendorff committed 2026-09-22 21:46:36 +02:00
1 parent dfdd561fc5
commit 80e68bb4e8
8 files changed
+591 -74

No files matched your search

+2 -2
View File
@@ -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));
}