Commit 118b8171 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

xwayland: Reserve enough space for sun_path

We also need to reserve space for the final null terminator.
parent df498d9b
......@@ -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'.
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment