mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
03c139ff898f51f96870c8524c096288e87bd9fb
strchr() per David's suggestion. strtok uses static (global) state to track the string it is parsing. In this case, load_exclude was also using strtok and calling parse_expr which was wiping out the previous strtok state. This introduce two bugs, first, only the first exclude on a line would be loaded from the exclude file, and second, there was an invalid access into free()'d memory in load_exclude (found with Valgrind). The use of strtok should be highly discouraged because these types of bugs are so easy to introduce.
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%