From ed9eae213b0dda3238d7e03320562544a71beb1a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 16 Mar 2026 21:13:13 +0000 Subject: nvmutil: prevent theoretical overflow on time() Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/nvmutil/nvmutil.c') 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; } -- cgit v1.2.1