Part Number: CC2530
The code enters an infinite loop when the packet size is wrong.
This is valid for all current versions of the gateway.
in tcp_client.c, remaining_len is not updated when it is invalid and therefore the client stays in the loop.
while (remaining_len > 0)
{
if ((unsigned)remaining_len < sizeof(pkt_ptr->header))
{
UI_PRINT_LOG("%sERROR: Packet header incomplete. expected_len=%d, actual_len=%d", DARK_RED, sizeof(pkt_ptr->header), remaining_len);
}
else if (remaining_len < (pkt_ptr->header.len + 4))
{
UI_PRINT_LOG("%sERROR: Packet truncated. expected_len=%d, actual_len=%d", DARK_RED, (pkt_ptr->header.len + 4), remaining_len);
}
else
{
[...]