mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-28 18:31:40 +00:00
Protect against invalid socket data potentially causing crashes
This commit is contained in:
@@ -180,6 +180,8 @@ static bool HandleHandshakeClient(ActiveClient &activeClient, ClientThread *thre
|
||||
{
|
||||
ReadSerialiser ser(new StreamReader(threadData->socket, Ownership::Nothing), Ownership::Stream);
|
||||
|
||||
ser.SetStreamingMode(true);
|
||||
|
||||
// this thread just handles receiving the handshake and sending a busy signal without blocking
|
||||
// the server thread
|
||||
RemoteServerPacket type = ser.ReadChunk<RemoteServerPacket>();
|
||||
@@ -1206,6 +1208,8 @@ RENDERDOC_CreateRemoteServerConnection(const rdcstr &URL, IRemoteServer **rend)
|
||||
{
|
||||
ReadSerialiser ser(new StreamReader(sock, Ownership::Nothing), Ownership::Stream);
|
||||
|
||||
ser.SetStreamingMode(true);
|
||||
|
||||
RemoteServerPacket type = ser.ReadChunk<RemoteServerPacket>();
|
||||
|
||||
uint32_t remoteVersion = 0;
|
||||
|
||||
Reference in New Issue
Block a user