mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
nvmutil: prevent theoretical overflow on time()
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user