nvmutil: prevent theoretical overflow on time()

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-16 21:13:13 +00:00
parent ca76a35f93
commit ed9eae213b

View File

@@ -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;
}