diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-16 21:13:13 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:42 +0000 |
| commit | d0a125c16d83cfe95379365f93899637a31f6411 (patch) | |
| tree | feae32eef2a336e5a9a20891e1c906765c1d0b09 | |
| parent | 28820d169c0089e1eb38ce0440b1f45fe36dbeac (diff) | |
nvmutil: prevent theoretical overflow on time()
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index c862fa0b..85f5d85d 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1478,7 +1478,7 @@ x_i_gettimeofday(struct x_st_timeval *tv, void *tz) t = time(NULL); tv->tv_sec = t; - tv->tv_usec = (long)clock() % 1000000; + tv->tv_usec = (long)((unsigned long)clock() % 1000000UL); return 0; } |
