Skip to content

Commit

Permalink
[libc] [ctime] fix rt_timespec_to_tick fun internal data overflow (#8198
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zhkag authored Oct 31, 2023
1 parent a64ccaa commit 1d3fc71
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 1d3fc71

Please sign in to comment.