mirror of
https://github.com/nmap/nmap.git
synced 2025-12-22 23:49:03 +00:00
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.
21 KiB
21 KiB