Skip to content

Commit

Permalink
fix: index out of bounds error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Oct 14, 2019
1 parent 0f504ef commit f7f0dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmdnsd/1035.c
Expand Up @@ -334,10 +334,10 @@ static bool _rrparse(struct message *m, struct resource *rr, int count, const un
return false;
}

rr[i].rdata = m->_packet + m->_len;
if (m->_len + rr[i].rdlength > MAX_PACKET_LEN) {
return false;
}
rr[i].rdata = m->_packet + m->_len;
m->_len += rr[i].rdlength;
memcpy(rr[i].rdata, *bufp, rr[i].rdlength);
}
Expand Down

0 comments on commit f7f0dd5

Please sign in to comment.