Commit e63439b0 authored by Jan Včelák's avatar Jan Včelák 🚀

knot_rrset_rr_from_wire: check that we are in wire

parent 8fec58c7
......@@ -635,7 +635,7 @@ static int parse_rdata(const uint8_t *pkt_wire, size_t *pos, size_t pkt_size,
int knot_rrset_rr_from_wire(const uint8_t *pkt_wire, size_t *pos,
size_t pkt_size, mm_ctx_t *mm, knot_rrset_t *rrset)
{
if (!pkt_wire || !pos || !rrset) {
if (!pkt_wire || !pos || !rrset || *pos > pkt_size) {
return KNOT_EINVAL;
}
......
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