mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-21 12:40:04 +00:00
lpeer.c: pktSize sanity check
This commit is contained in:
parent
a023929190
commit
8627f5b85d
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user