Merge branch '1.31-security'

Conflicts:
	NEWS
	ntp_core.c
This commit is contained in:
Miroslav Lichvar
2015-04-07 15:34:39 +02:00
3 changed files with 21 additions and 6 deletions

View File

@@ -199,7 +199,10 @@ set_subnet(TableNode *start_node,
/* How many subnet entries to set : 1->8, 2->4, 3->2 */
N = 1 << (NBITS-bits_to_go);
subnet = get_subnet(ip, bits_consumed);
subnet = get_subnet(ip, bits_consumed) & ~(N - 1);
assert(subnet + N <= TABLE_SIZE);
if (!(node->extended)) {
open_node(node);
}