mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-24 02:04:02 +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);
|
t = time(NULL);
|
||||||
|
|
||||||
tv->tv_sec = t;
|
tv->tv_sec = t;
|
||||||
tv->tv_usec = (long)clock() % 1000000;
|
tv->tv_usec = (long)((unsigned long)clock() % 1000000UL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user