blob: a8e349a2ffc4fb71865f82d9d8525752cb4b2db5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
fix: server: initialize the m_protocol member with a default value
It is likely random whether the server works or not without
a manually configured protocol option, which is neither documented
nor enforced to be set.
With a random uninitialized value in m_protocol, this can happen:
[2025-08-03T12:39:57] NOTE: accepted client connection
[2025-08-03T12:39:57] FATAL: a runtime error occurred: XInvalidProtocol
Reports of "it works with debug enabled" are likely due to having
parts of the memory space the server object is allocated into being
cleared, and thus having a 0 (Synergy) startup value.
This patch had been modified to apply against 1.23.0
--- a/src/lib/server/Server.h
+++ b/src/lib/server/Server.h
@@ -358,7 +358,7 @@ private:
};
// used in hello message sent to the client
- ENetworkProtocol m_protocol;
+ ENetworkProtocol m_protocol = ENetworkProtocol::kSynergy;
// the primary screen client
PrimaryClient *m_primaryClient;
|