Permalink
Browse files

FR-GV-205 - check for "too long" options, too

  • Loading branch information...
alandekok committed Jul 3, 2017
1 parent 812766e commit 10b6de9345c9e0d9d4d5e0426fa5c3d68d702875
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/lib/dhcp.c
@@ -599,6 +599,12 @@ ssize_t fr_dhcp_decode_options(uint8_t *data, size_t len, VALUE_PAIR **head)
continue;
}

/*
* End of this attribute past the end of the
* packet: ignore it.
*/
if (next > (data + len)) break;

da = dict_attrbyvalue(DHCP2ATTR(p[0]));
if (!da) {
fr_strerror_printf("Attribute not in our dictionary: %u",

0 comments on commit 10b6de9

Please sign in to comment.