xwayland: Reserve enough space for sun_path
We also need to reserve space for the final null terminator.
This commit is contained in:
parent
df498d9be4
commit
118b817134
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ UnixSocketAddress::UnixSocketAddress(const QString &socketPath, Type type)
|
|||
{
|
||||
const QByteArray encodedSocketPath = QFile::encodeName(socketPath);
|
||||
|
||||
int byteCount = offsetof(sockaddr_un, sun_path) + encodedSocketPath.size();
|
||||
int byteCount = offsetof(sockaddr_un, sun_path) + encodedSocketPath.size() + 1;
|
||||
if (type == Type::Abstract) {
|
||||
byteCount++; // For the first '\0'.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue