|
|
|
@ -101,6 +101,7 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
@@ -101,6 +101,7 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
server = new QLocalServer(this); |
|
|
|
|
server->setSocketOptions(QLocalServer::UserAccessOption); |
|
|
|
|
QString lockName = QDir(QDir::tempPath()).absolutePath() |
|
|
|
|
+ QLatin1Char('/') + socketName |
|
|
|
|
+ QLatin1String("-lockfile"); |
|
|
|
@ -191,6 +192,12 @@ void QtLocalPeer::receiveConnection()
@@ -191,6 +192,12 @@ void QtLocalPeer::receiveConnection()
|
|
|
|
|
QByteArray uMsg; |
|
|
|
|
quint32 remaining; |
|
|
|
|
ds >> remaining; |
|
|
|
|
if (remaining > 65535) { |
|
|
|
|
// drop suspiciously large data
|
|
|
|
|
delete socket; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uMsg.resize(remaining); |
|
|
|
|
int got = 0; |
|
|
|
|
char* uMsgBuf = uMsg.data(); |
|
|
|
|