diff options
| author | kk <[email protected]> | 2023-10-31 20:59:01 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-31 08:59:01 -0400 |
| commit | 1d3fc71c79d7c73e31fc797c797170dede8eb75a (patch) | |
| tree | c6700c41b4abb9cdaa5f6153fc64b5df4807f02c /components/libc/compilers/common/ctime.c | |
| parent | a64ccaa295373ddc8c506d1f37c90ad294f53fbe (diff) | |
[libc] [ctime] fix rt_timespec_to_tick fun internal data overflow (#8198)
Diffstat (limited to 'components/libc/compilers/common/ctime.c')
| -rw-r--r-- | components/libc/compilers/common/ctime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c index 550b89522d..f2cc76df47 100644 --- a/components/libc/compilers/common/ctime.c +++ b/components/libc/compilers/common/ctime.c @@ -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); |
