added sanity checks

This commit is contained in:
2020-08-18 19:11:31 -05:00
parent 208f4b3bbd
commit 47b76b422c
6 changed files with 53 additions and 10 deletions

View File

@@ -41,7 +41,7 @@
/*
Packets format (sent from the client):
[4 bytes] - size of packet (including these 4 bytes!)
[4 bytes] - size of packet including the 4 byte packet type
[size bytes] - Encrypted packet (byte swapped && xor'd with 8 byte key; see CNSocketEncryption)
[4 bytes] - packet type (which is a combination of the first 4 bytes of the packet and a checksum in some versions)
[structure]