-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
A simple nmap -V could cause a crash in display_nmap_version(). The reason seems to be this piece of pcap-version code:
#ifdef WIN32
const char *pcap_num = strstr(pcap_version, "version ");
if (pcap_num) {
pcap_num += strlen("version ");
}
std::string pcap_num_str (pcap_num, strchr(pcap_num, ',') - pcap_num);
When there's no comma after pcap_num, it tries to push_back an almost infinite string!
When building with the internal Nmap libpcap, this does not happen. But when using the official libpcap, it does. Blame the horrid WIN32 code in pcap_lib_version().
(For me, it's no longer possible to build using MSVC-2017 and the internal libpcap).
Metadata
Metadata
Assignees
Labels
No labels