1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 11:49:01 +00:00
Files
nmap/nmap_dns.cc
david c6ca94dc43 Fix encoded_name_to_normal for the name ".".
When a DNS name was only "."; i.e., the first byte in its encoded
representation was 0, encoded_name_to_normal wouldn't null-terminate the
string. This caused multiple warnings
	Illegal character(s) in hostname -- replacing with '*'
as later code read from uninitialized memory. Now we null-terminate
whenever the function returns success, and treat "." as a special case
for which we retain the trailing dot.

This bug was found by Gisle Vanem, who wrote a patch to fix it. I added
some more error checking to the patch.
2012-01-08 04:41:58 +00:00

43 KiB