From fa95842462af583d7e0842d02df0e2a19934c0fc Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 4 Mar 2020 20:06:06 +0100 Subject: vppinfra: fix 32-bit overflow in os_cpu_clock_frequency Type: fix Change-Id: I23250fcbc70086584b5448baec9af9a1528992f5 Signed-off-by: Damjan Marion Signed-off-by: Dave Barach --- src/vppinfra/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vppinfra') diff --git a/src/vppinfra/time.c b/src/vppinfra/time.c index 27758dc7534..edeca1f9c2f 100644 --- a/src/vppinfra/time.c +++ b/src/vppinfra/time.c @@ -165,7 +165,7 @@ os_cpu_clock_frequency (void) clib_get_cpuid (0x15, &eax, &ebx, &ecx, &edx); if (ebx && ecx) - return ecx * ebx / eax; + return (u64) ecx *ebx / eax; if (max_leaf >= 0x16) { -- cgit 1.2.3-korg