mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 11:49:01 +00:00
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.
43 KiB
43 KiB