From 1fb98afd73001b8c7c5724a3e199131787290a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20G=C3=A4hwiler?= Date: Fri, 8 Feb 2019 10:40:14 +0200 Subject: [PATCH] fix potential integer overflow --- src/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index b1772b9..b02c31f 100644 --- a/src/client.c +++ b/src/client.c @@ -358,7 +358,7 @@ lwmqtt_err_t lwmqtt_connect(lwmqtt_client_t *client, lwmqtt_options_t options, l client->timer_set(client->command_timer, timeout); // save keep alive interval (take 75% to be a little earlier than actually needed) - client->keep_alive_interval = (uint32_t)(options.keep_alive * 750); + client->keep_alive_interval = (uint32_t)(options.keep_alive) * 750; // set keep alive timer client->timer_set(client->keep_alive_timer, client->keep_alive_interval);