}
if ((p[1] + 2) > (end - p)) {
- fr_strerror_printf("%s: Suboption would overflow option. Remaining option data %zu byte(s) "
- "(from %zu), Suboption length %u", __FUNCTION__, (end - p), data_len, p[1]);
+ fr_strerror_printf("%s: Suboption %02x would overflow option. Remaining option data %zu byte(s) "
+ "(from %zu), Suboption length %u",
+ __FUNCTION__, p[0], (end - p), data_len, p[1]);
return -1;
}
* Vendor is "MSFT 98"
*/
vp = fr_pair_find_by_da(head, attr_dhcp_vendor_class_identifier, TAG_ANY);
- if (vp && (strcmp(vp->vp_strvalue, "MSFT 98") == 0)) {
+ if (vp && (vp->vp_length == 7) && (memcmp(vp->vp_strvalue, "MSFT 98", 7) == 0)) {
vp = fr_pair_find_by_da(head, attr_dhcp_flags, TAG_ANY);
/*