mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 03:11:48 +00:00
Adjust ipaddr length by 1 byte (null already accounted for)
This commit is contained in:
parent
acbf533dcb
commit
1ef698cb7e
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue