Skip to content

Commit

Permalink
fix rt_timespec_to_tick fun internal data overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zhkag committed Oct 30, 2023
1 parent 1554888 commit 9beb6d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/libc/compilers/common/ctime.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,8 @@ RTM_EXPORT(clock_settime);
int rt_timespec_to_tick(const struct timespec *time)
{
int tick;
int nsecond, second;
int second;
long long nsecond;
struct timespec tp = {0};

RT_ASSERT(time != RT_NULL);
Expand Down

0 comments on commit 9beb6d7

Please sign in to comment.