diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-16 21:13:13 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-16 21:13:13 +0000 |
| commit | ed9eae213b0dda3238d7e03320562544a71beb1a (patch) | |
| tree | 0490ba1796f09a678c21db731555f6cc83ef1263 | |
| parent | ca76a35f934e80781696efe495d8cd136c9bee31 (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; } |
