Use uint64_t instead of size_t in wire protocol struct (#40412)
LX_INIT_START_SOCKET_RELAY::BufferSize used size_t, which varies by platform (4 bytes on 32-bit, 8 on 64-bit). All other wire protocol structs in lxinitshared.h use fixed-width integer types. While both Windows and Linux sides are currently 64-bit (so size_t is 8 bytes on both), using size_t in a serialized cross-boundary struct violates wire protocol conventions and would break if either side ever runs in a 32-bit context. Replace with uint64_t for consistency with the rest of the wire protocol and future-proofing. Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ben Hillis committed
May 4, 2026 at 19:17 UTC
2021157bd55ac1b35a41569a771d92579571a9b6
1 file changed
+1
-1
src/shared/inc/lxinitshared.h
+1
-1
@@ -1115,7 +1115,7 @@ typedef struct _LX_INIT_START_SOCKET_RELAY
1115
MESSAGE_HEADER Header;
1116
unsigned short Family;
1117
unsigned short Port;
1118
- size_t BufferSize;
1118
+ uint64_t BufferSize;
1119
1120
PRETTY_PRINT(FIELD(Header), FIELD(Family), FIELD(Port), FIELD(BufferSize));
1121
} LX_INIT_START_SOCKET_RELAY, *PLX_INIT_START_SOCKET_RELAY;