1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Cast wider before shifting.

This commit is contained in:
dmiller
2025-07-15 18:25:09 +00:00
parent 117329a5e4
commit b2cdb23fc0

View File

@@ -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;