Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
118b8171
Commit
118b8171
authored
Feb 11, 2021
by
Vlad Zahorodnii
Browse files
xwayland: Reserve enough space for sun_path
We also need to reserve space for the final null terminator.
parent
df498d9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/xwl/xwaylandsocket.cpp
View file @
118b8171
...
...
@@ -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'.
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment