Commit a8267f35 authored by Vladimír Čunát's avatar Vladimír Čunát

knot_rrset_txt_dump_data: don't segfault if out of range

parent d60983a5
......@@ -1756,6 +1756,10 @@ int knot_rrset_txt_dump_data(const knot_rrset_t *rrset,
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, pos);
if (rr_data == NULL) {
return KNOT_EINVAL; /* bad pos or rrset->rrs */
uint8_t *data = knot_rdata_data(rr_data);
uint16_t data_len = knot_rdata_rdlen(rr_data);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment