mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Adjust ipaddr length by 1 byte (null already accounted for)
This commit is contained in:
@@ -986,7 +986,7 @@ static void parse_resolvdotconf() {
|
||||
FILE *fp;
|
||||
char buf[2048], *tp;
|
||||
char fmt[32];
|
||||
char ipaddr[INET6_ADDRSTRLEN+1];
|
||||
char ipaddr[INET6_ADDRSTRLEN];
|
||||
|
||||
fp = fopen("/etc/resolv.conf", "r");
|
||||
if (fp == NULL) {
|
||||
@@ -994,7 +994,7 @@ static void parse_resolvdotconf() {
|
||||
return;
|
||||
}
|
||||
|
||||
Snprintf(fmt, sizeof(fmt), "nameserver %%%us", INET6_ADDRSTRLEN);
|
||||
Snprintf(fmt, sizeof(fmt), "nameserver %%%us", INET6_ADDRSTRLEN-1);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp)) {
|
||||
tp = buf;
|
||||
|
||||
Reference in New Issue
Block a user