mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 01:49:03 +00:00
c8b9bf8107759d626b7f7466a482fa5f61b39899
Contrary to the doc comment, this function could never return false but only cause a fatal error. Resolves these Parfait reports (http://seclists.org/nmap-dev/2012/q4/412). Error: Null pointer dereference (CWE 476) Read from null pointer 'port' at line 344 of components/nmap/build/amd64/portlist.cc in function 'PortList::setServiceProbeResults(unsigned short, int, serviceprobestate, char const*, service_tunnel_type, char const*, char const*, char const*, char const*, char const*, char const*, std::vector<char const*, std::allocator<char const*> > const*, char const*)'. Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 343. Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'. Error: Null pointer dereference (CWE 476) Write to null pointer 'current' at line 520 of components/nmap/build/amd64/portlist.cc in function 'PortList::setPortState(unsigned short, unsigned char, int)'. Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 518. Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'. Error: Null pointer dereference (CWE 476) Write to null pointer 'answer' at line 880 of components/nmap/build/amd64/portlist.cc in function 'PortList::setStateReason(unsigned short, unsigned char, unsigned short, unsigned char, sockaddr_storage const*)'. Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 877. Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'. at line 885 of components/nmap/build/amd64/portlist.cc in function 'PortList::setStateReason(unsigned short, unsigned char, unsigned short, unsigned char, sockaddr_storage const*)'. Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 877. Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'.
Remove the NSE sample script. It is a great idea, but nobody seems to use it (for example, there were no replies to usage inquiry here: http://seclists.org/nmap-dev/2012/q4/379). I think there are two main uses for this script, both of which are being served by other resources. 1) as a template for new scripts. Users instead seem to pick a script that is most similar to the one they want to write and start with that. 2) As a way to learn more about the format of an NSE script. Users instead seem to use our documentation (http://nmap.org/book/nse-script-format.html). So I'm deleting it for now. But if folks miss it, they're welcome and encouraged to say so on dev@nmap.org and we could consider putting it back and/or improving it
Here is some documentation for Nmap, but these files are much less comprehensive than what you'll find at the actual Nmap documentation site ( http://nmap.org ).
Description
Languages
C
37.8%
Lua
28.1%
C++
16.7%
Shell
5.8%
Python
4.2%
Other
7.2%