Eliminate crash in mac_prefix_init() on platforms with 32-bit long. Closes #2732

This commit is contained in:
dmiller 2026-07-22 18:08:15 +00:00
parent 9893d6e61c
commit 539829b284
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
#Nmap Changelog ($Id$); -*-text-*-
o [GH#2732] Fix a potential crash on 32-bit platforms in debug mode due to
incorrect format specifier for 64-bit integer type. [Christopher Chavez]
o [GH#3201][GH#3367] Increase line length limit for nmap-service-probes and
correctly handle lines that are too long. [@liquidpele, Ashutosh Kumar Singh]

View file

@ -159,7 +159,7 @@ static void mac_prefix_init() {
std::pair<MacMap::iterator, bool> status = MacTable.insert(std::pair<u64, const char *>(pfx, string_pool_substr(vendor, endptr)));
if (!status.second && o.debugging > 1)
error("MAC prefix %0*lX is duplicated in %s; ignoring duplicates.", (int)(pfx >> 36), pfx & 0xfffffffffL, filename);
error("MAC prefix %0*" PRIX64 " is duplicated in %s; ignoring duplicates.", (int)(pfx >> 36), pfx & 0xfffffffffL, filename);
}
fclose(fp);