mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
math32: Integer overflow occurs in arithmetic on constant operands
https://coverity.pt.xiaomi.com/#/project-view/10098/10010?selectedIssue=1266083 Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -133,9 +133,9 @@ extern "C"
|
|||||||
# define __umul64_const(res, m, n, bias) \
|
# define __umul64_const(res, m, n, bias) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
uint32_t __m_lo = (m); \
|
uint32_t __m_lo = (m) & 0xffffffff; \
|
||||||
uint32_t __m_hi = (m) >> 32; \
|
uint32_t __m_hi = (m) >> 32; \
|
||||||
uint32_t __n_lo = (n); \
|
uint32_t __n_lo = (n) & 0xffffffff; \
|
||||||
uint32_t __n_hi = (n) >> 32; \
|
uint32_t __n_hi = (n) >> 32; \
|
||||||
uint32_t __res_lo; \
|
uint32_t __res_lo; \
|
||||||
uint32_t __res_hi; \
|
uint32_t __res_hi; \
|
||||||
|
|||||||
Reference in New Issue
Block a user