mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-22 04:50:06 +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")
|
LAIKA_ERROR("received evil pktID!\n")
|
||||||
|
|
||||||
peer->pktSize = peer->pktSizeTable[peer->pktID];
|
peer->pktSize = peer->pktSizeTable[peer->pktID];
|
||||||
|
|
||||||
|
if (peer->pktSize == 0)
|
||||||
|
LAIKA_ERROR("unsupported packet!\n")
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case LAIKAPKT_VARPKT_REQ:
|
case LAIKAPKT_VARPKT_REQ:
|
||||||
/* try grabbing pktID & size */
|
/* try grabbing pktID & size */
|
||||||
|
Loading…
Reference in New Issue
Block a user