in src/mqtt_client.c [147:160]
static uint16_t byteutil_read_uint16(uint8_t** buffer, size_t byteLen)
{
uint16_t result = 0;
if (buffer != NULL && *buffer != NULL && byteLen >= 2)
{
result = 256 * (**buffer) + (*(*buffer + 1));
*buffer += 2; // Move the ptr
}
else
{
LogError("byteutil_read_uint16 == NULL or less than 2");
}
return result;
}