coverity: Incorrect shifting in DNS_RPZ_ZMASK
________________________________________________________________________________________________________
*** CID 1430160: (BAD_SHIFT)
/lib/ns/query.c: 2610 in rpz_get_zbits()
2604 * the smallest name,
2605 * the longest IP address prefix,
2606 * the lexically smallest address.
2607 */
2608 if (st->m.policy != DNS_RPZ_POLICY_MISS) {
2609 if (st->m.type >= rpz_type) {
>>> CID 1430160: (BAD_SHIFT)
>>> In expression "1 << st->m.rpz->num + 1", left shifting by more than 31 bits has undefined behavior. The shift amount, "st->m.rpz->num + 1", is as much as 63.
2610 zbits &= DNS_RPZ_ZMASK(st->m.rpz->num);
2611 } else{
2612 zbits &= DNS_RPZ_ZMASK(st->m.rpz->num) >> 1;
2613 }
2614 }
2615
/lib/ns/query.c: 2612 in rpz_get_zbits()
2606 * the lexically smallest address.
2607 */
2608 if (st->m.policy != DNS_RPZ_POLICY_MISS) {
2609 if (st->m.type >= rpz_type) {
2610 zbits &= DNS_RPZ_ZMASK(st->m.rpz->num);
2611 } else{
>>> CID 1430160: (BAD_SHIFT)
>>> In expression "1 << st->m.rpz->num + 1", left shifting by more than 31 bits has undefined behavior. The shift amount, "st->m.rpz->num + 1", is as much as 63.
2612 zbits &= DNS_RPZ_ZMASK(st->m.rpz->num) >> 1;
2613 }
2614 }
2615
2616 /*
2617 * If the client wants recursion, allow only compatible policies.
Edited by Ghost User