Skip to content
Snippets Groups Projects
Commit 635434b7 authored by Jan Hák's avatar Jan Hák Committed by Daniel Salzman
Browse files

libknot: fix zero pointer dereference of TSIG

parent f7dc34e3
No related branches found
No related tags found
No related merge requests found
Pipeline #129385 passed
......@@ -245,7 +245,11 @@ int knot_tsig_rdata_set_other_data(knot_rrset_t *tsig, uint16_t len,
_public_
const knot_dname_t *knot_tsig_rdata_alg_name(const knot_rrset_t *tsig)
{
return knot_rdataset_at(&tsig->rrs, 0)->data;
const knot_rdata_t *rr_data = knot_rdataset_at(&tsig->rrs, 0);
if (!rr_data) {
return NULL;
}
return rr_data->data;
}
_public_
......
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