mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
Possible null-pointer dereference
The value should be dereferenced after
assertion is performed. This can lead
to crash
(cherry picked from commit 7eba14cb76
)
This commit is contained in:
parent
77c12bb124
commit
dbb3b3a3a1
@ -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