4793. [bug] nsupdate -[46] could overflow the array of server

addresses. [RT #46402]
This commit is contained in:
Mark Andrews 2017-10-26 16:00:24 +11:00
parent 5c76f3664c
commit 87387d8a41
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,6 @@
4793. [bug] nsupdate -[46] could overflow the array of server
addresses. [RT #46402]
4792. [bug] Fix map file header correctness check. [RT #38418]
4791. [doc] Fixed outdated documentation about export libraries.

View file

@ -944,16 +944,21 @@ setup_system(void) {
case AF_INET:
if (have_ipv4) {
sa->type.sin.sin_port = htons(dnsport);
} else {
continue;
}
break;
case AF_INET6:
if (have_ipv6) {
sa->type.sin6.sin6_port = htons(dnsport);
} else {
continue;
}
break;
default:
fatal("bad family");
}
INSIST(i < ns_alloc);
servers[i++] = *sa;
}
}