Skip to content

Commit

Permalink
math32: Integer overflow occurs in arithmetic on constant operands
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zyfeier authored and GUIDINGLI committed Sep 9, 2024
1 parent eadb155 commit b190a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/nuttx/lib/math32.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ extern "C"
# define __umul64_const(res, m, n, bias) \
do \
{ \
uint32_t __m_lo = (m); \
uint32_t __m_lo = (m) & 0xffffffff; \
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 __res_lo; \
uint32_t __res_hi; \
Expand Down

0 comments on commit b190a92

Please sign in to comment.