mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-02 19:08:57 +00:00
fixed possible division by zero
This commit is contained in:
parent
8609d1e790
commit
252126cf76
|
@ -80,6 +80,9 @@ HISTORY
|
||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2013-04-24: Simon Goldschmidt
|
||||||
|
* igmp.c: fixed possible division by zero
|
||||||
|
|
||||||
2013-04-24: Simon Goldschmidt
|
2013-04-24: Simon Goldschmidt
|
||||||
* ip6.h, some ipv6 C files: fixed bug #38526 Coverity: Recursive Header Inclusion in ip6.h
|
* ip6.h, some ipv6 C files: fixed bug #38526 Coverity: Recursive Header Inclusion in ip6.h
|
||||||
|
|
||||||
|
|
|
@ -701,7 +701,7 @@ igmp_start_timer(struct igmp_group *group, u8_t max_time)
|
||||||
}
|
}
|
||||||
#ifdef LWIP_RAND
|
#ifdef LWIP_RAND
|
||||||
/* ensure the random value is > 0 */
|
/* ensure the random value is > 0 */
|
||||||
group->timer = (LWIP_RAND() % (max_time - 1)) + 1;
|
group->timer = (LWIP_RAND() % max_time);
|
||||||
#endif /* LWIP_RAND */
|
#endif /* LWIP_RAND */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user