Commit 797a6c43 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

lib/validate: fixed memory bug

this code used memory pool of source packet instead
of the answer, this could result in invalidated
memory read if the memory occupied by source
packet was rewritten
parent e61c48ef
......@@ -484,7 +484,7 @@ static int validate(knot_layer_t *ctx, knot_pkt_t *pkt)
const knot_pktsection_t *auth = knot_pkt_section(pkt, KNOT_AUTHORITY);
for (unsigned i = 0; i < auth->count; ++i) {
const knot_rrset_t *rr = knot_pkt_rr(auth, i);
kr_rrarray_add(&req->authority, rr, &pkt->mm);
kr_rrarray_add(&req->authority, rr, &req->answer->mm);
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