Nsock checks for NULL, but not for empty string. Rather than making
Nsock decide, each app will decide whether to call
nsock_pool_set_device, with all currently skipping the call if device is
an empty string.
Small strings have greater malloc alignment overhead which we save
(~300KB) with this method. string_pool was a slight memory savings but
greater computational cost due to memory overhead and insertion
calculation.
First reported here: https://seclists.org/nmap-dev/2014/q2/105
We handle empty strings just fine, so treat it like that instead of
asserting that the capture must start before the end of the string.
I added this a long time ago, and decided to check it. In fact,
newstrlen is used to calculate newstrend, and each section of the
template is checked to ensure it does not go past newstrend, so the
intent is met and the length is not exceeded. I still think it could be
written more clearly, but it's good for now. #1834
Full description in GitHub PR#977
o [GH#977] Improved DNS service version detection coverage and consitentcy
by using data from a Project Sonar Internet wide survey. Numerouse false
positives were removed and reliable softmatches added. Match lines for
version.bind responses were also conslidated using the technique below.
[Tom Sellers]
o [GH#977] Changed version probe fallbacks so as to work cross protocol
(TCP/UDP). This enables consolidating match lines for services where the
responses on TCP and UDP are similar. [Tom Sellers]
When this case was added in r29097, the #ifndef was mistaken for #ifdef.
The error, which was only discovered on Windows, was therefore not
handled only on Windows systems. This commit makes the check
unconditional. http://seclists.org/nmap-dev/2015/q4/217