1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-24 21:41:04 +00:00

lpeer.c: pktSize sanity check

This commit is contained in:
CPunch 2022-01-27 20:10:41 -06:00
parent a023929190
commit 8627f5b85d

View File

@ -45,6 +45,10 @@ bool laikaS_handlePeerIn(struct sLaika_peer *peer) {
LAIKA_ERROR("received evil pktID!\n")
peer->pktSize = peer->pktSizeTable[peer->pktID];
if (peer->pktSize == 0)
LAIKA_ERROR("unsupported packet!\n")
break;
case LAIKAPKT_VARPKT_REQ:
/* try grabbing pktID & size */