Skip to content

Commit

Permalink
fix potential integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Feb 8, 2019
1 parent 64ff641 commit 1fb98af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1fb98af

Please sign in to comment.