mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
MQTT: Add check that WILL topic length must be > 0
(cherry picked from commit 52f448978f
)
This commit is contained in:
parent
890c5982a1
commit
cb97e27120
@ -1231,6 +1231,7 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
|
||||
}
|
||||
len = strlen(client_info->will_topic);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_topic length overflow", len <= 0xFF, return ERR_VAL);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_topic length must be > 0", len > 0, return ERR_VAL);
|
||||
will_topic_len = (u8_t)len;
|
||||
len = strlen(client_info->will_msg);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL);
|
||||
|
Loading…
Reference in New Issue
Block a user