Skip to content
Snippets Groups Projects
Commit 288c3091 authored by Jan Kadlec's avatar Jan Kadlec Committed by Marek Vavrusa
Browse files

Added extra check to semantic checks.

parent 9a7e48f6
No related branches found
No related tags found
No related merge requests found
......@@ -960,6 +960,14 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone, knot_node_t *nod
uint8_t *next_dname_decoded = NULL;
size_t real_size = 0;
int32_t b32_ret;
/* Make sure RRSet has enough data. */
if (!knot_rrset_rdata(nsec3_rrset) ||
knot_rdata_item_count(nsec3_rrset) <= 5) {
/* Not enough data to do complete check -> incomplete chain. */
err_handler_handle_error(handler, node, ZC_ERR_NSEC3_NOT_FOUND);
return KNOT_EOK;
}
b32_ret = base32hex_encode_alloc((uint8_t *)
(rdata_item_data(&(nsec3_rrset->rdata->items[4]))) + 1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment