1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 23:49:03 +00:00
Files
nmap/TargetGroup.cc
bmenrigh 03c139ff89 Fixed (removed) the use of strtok in TargetGroup::parse_expr by using
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.
2009-03-16 21:31:57 +00:00

21 KiB