Date: Tue, 08 Feb 2022 19:16:57 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261781] vdso: Time calculation integer overflow Message-ID: <bug-261781-227-qvALloFbtN@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-261781-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261781 --- Comment #3 from Konstantin Belousov <kib@FreeBSD.org> --- I see, do you mean the following: diff --git a/lib/libc/sys/__vdso_gettimeofday.c b/lib/libc/sys/__vdso_gettimeofday.c index c1457a54d37e..cf1400cdf291 100644 --- a/lib/libc/sys/__vdso_gettimeofday.c +++ b/lib/libc/sys/__vdso_gettimeofday.c @@ -83,9 +83,9 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk, bool abs) return (error); scale = th->th_scale; #ifdef _LP64 - scale_bits = ffsl(scale); + scale_bits = flsl(scale); #else - scale_bits = ffsll(scale); + scale_bits = flsll(scale); #endif if (__predict_false(scale_bits + fls(delta) > 63)) { x = (scale >> 32) * delta; -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261781-227-qvALloFbtN>
