mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-24 15:14:06 +00:00
Possible null-pointer dereference
The value should be dereferenced after assertion is performed. This can lead to crash
This commit is contained in:
parent
08cb949aea
commit
7eba14cb76
@ -360,8 +360,9 @@ mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id)
|
||||
static void
|
||||
mqtt_request_time_elapsed(struct mqtt_request_t **tail, u8_t t)
|
||||
{
|
||||
struct mqtt_request_t *r = *tail;
|
||||
struct mqtt_request_t *r;
|
||||
LWIP_ASSERT("mqtt_request_time_elapsed: tail != NULL", tail != NULL);
|
||||
r = *tail;
|
||||
while (t > 0 && r != NULL) {
|
||||
if (t >= r->timeout_diff) {
|
||||
t -= (u8_t)r->timeout_diff;
|
||||
|
Loading…
Reference in New Issue
Block a user