From b2cdb23fc0c9219c8413e3b906736dc10f398bc8 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 15 Jul 2025 18:25:09 +0000 Subject: [PATCH] Cast wider before shifting. --- MACLookup.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MACLookup.cc b/MACLookup.cc index 2f9848ba1..ab9c013a5 100644 --- a/MACLookup.cc +++ b/MACLookup.cc @@ -188,7 +188,7 @@ const char *MACPrefix2Corp(const u8 *prefix) { mac_prefix_init(); /* MA-S: 36 bits (9 nibbles)*/ - key = ((u64)prefix[0] << 28) + (prefix[1] << 20) + (prefix[2] << 12) + (prefix[3] << 4) + (prefix[4] >> 4); + key = ((u64)prefix[0] << 28) + ((u64)prefix[1] << 20) + ((u64)prefix[2] << 12) + ((u64)prefix[3] << 4) + (prefix[4] >> 4); corp = findMACEntry(((u64)9 << 36) + key); if (corp) return corp;