1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-04 15:20:07 +00:00

laikaS_endInPacket() bug fix

- sock->inCount was not properly set
This commit is contained in:
2022-02-03 16:46:12 -06:00
parent dd173ee422
commit 5fe72e9eb0
2 changed files with 4 additions and 1 deletions

View File

@@ -234,6 +234,9 @@ int laikaS_endInPacket(struct sLaika_socket *sock) {
LAIKA_ERROR("Failed to decrypt packet!\n")
}
/* decrypted message is smaller now */
sock->inCount -= crypto_secretbox_MACBYTES;
/* remove nonce */
laikaM_rmvarray(sock->inBuf, sock->inCount, sock->inStart, crypto_secretbox_NONCEBYTES);