[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation (#10369)

Martine Lenders notifications at github.com
Wed Jan 30 16:43:44 CET 2019


miri64 commented on this pull request.



> @@ -519,7 +519,7 @@ static inline uint32_t _exp_backoff_retrans_timer(uint8_t ns_sent,
 
     /* backoff according to  https://tools.ietf.org/html/rfc7048 with
      * BACKOFF_MULTIPLE == 2 */
-    tmp = ((1 << ns_sent) * retrans_timer * tmp) / US_PER_MS;
+    tmp = ((((uint32_t) 1) << ns_sent) * retrans_timer * tmp) / US_PER_MS;

So how do I proceed :-)?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10369#discussion_r252312128
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190130/cf902d66/attachment.html>


More information about the notifications mailing list