mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 06:00:41 +02:00
FEXServer: Be robust against invalid packets.
Chrome seems to like sending us invalid packets of data sometimes. With an invalid packet type just skip parsing the data entirely. Fixes an infinite loop in Vampire Survivors.
This commit is contained in:
1 parent
70a3ceb64e
commit
a0fb9531db
1 file changed
+3
@@ -431,6 +431,9 @@ namespace ProcessPipe {
|
||||
// Invalid
|
||||
case FEXServerClient::PacketType::TYPE_ERROR:
|
||||
default:
|
||||
// Something sent us an invalid packet. To ensure we don't spin infinitely, consume all the data.
|
||||
LogMan::Msg::EFmt("[FEXServer] InvalidPacket size received 0x{:x} bytes", CurrentRead - CurrentOffset);
|
||||
CurrentOffset = CurrentRead;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user