mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 22:29:47 -06:00
avoid crashing when receiving a packet that is too large
This commit is contained in:
@ -410,6 +410,8 @@ void LAN_RXCallback(u_char* blarg, const struct pcap_pkthdr* header, const u_cha
|
||||
{
|
||||
while (PCapRXNum > 0);
|
||||
|
||||
if (header->len > 2048-64) return;
|
||||
|
||||
PCapPacketLen = header->len;
|
||||
memcpy(PCapPacketBuffer, data, PCapPacketLen);
|
||||
PCapRXNum = 1;
|
||||
|
Reference in New Issue
Block a user