Fix off-by-one in DHCPv6 FQDN option decoding.

This commit is contained in:
Simon Kelley
2012-03-30 20:48:20 +01:00
parent 5ef33279f2
commit fbbc14541a

View File

@@ -353,7 +353,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
char *pq = daemon->dhcp_buff; char *pq = daemon->dhcp_buff;
pp = op; pp = op;
while (*op != 0 && ((op + (*op) + 1) - pp) < len) while (*op != 0 && ((op + (*op)) - pp) < len)
{ {
memcpy(pq, op+1, *op); memcpy(pq, op+1, *op);
pq += *op; pq += *op;