Commit 6e3382e9 authored by Marek Vavrusa's avatar Marek Vavrusa

Fixed wrong RRSet serialization position incrementing code.

parent 55404e8b
......@@ -643,9 +643,10 @@ static void rrset_serialize_rr(const knot_rrset_t *rrset, size_t rdata_pos,
uint8_t *rdata = rrset_rdata_pointer(rrset, rdata_pos);
if (descriptor_item_is_dname(item)) {
const knot_dname_t *dname = rdata + offset;
*size += knot_dname_to_wire(stream + *size, dname,
KNOT_DNAME_MAXLEN);
offset += *size;
int dname_len = knot_dname_to_wire(stream + *size, dname,
KNOT_DNAME_MAXLEN);
*size += dname_len;
offset += dname_len;
} else if (descriptor_item_is_fixed(item)) {
memcpy(stream + *size, rdata + offset, item);
offset += item;
......
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