1
0
mirror of https://github.com/CPunch/Laika.git synced 2026-02-08 17:20:04 +00:00

Lib: Variadic packets now use the 'size' field as a minimum requirement

This commit is contained in:
2022-06-30 10:00:11 -05:00
parent bc071c10d2
commit 18a6fdd124
6 changed files with 11 additions and 7 deletions

View File

@@ -103,7 +103,7 @@ void laikaC_handleAuthenticatedShellData(struct sLaika_peer *authPeer, LAIKAPKT_
struct sLaika_shellInfo *shell;
uint32_t id;
if (sz - sizeof(uint32_t) > LAIKA_SHELL_DATA_MAX_LENGTH || sz <= sizeof(uint32_t))
if (sz - sizeof(uint32_t) > LAIKA_SHELL_DATA_MAX_LENGTH)
LAIKA_ERROR("laikaC_handleAuthenticatedShellData: Wrong data size!\n");
laikaS_readInt(&authPeer->sock, &id, sizeof(uint32_t));