/*
* See if there's a TLV in the response.
*/
-static int eappeap_check_tlv(REQUEST *request, const uint8_t *data)
+static int eappeap_check_tlv(REQUEST *request, const uint8_t *data,
+ size_t data_len)
{
const eap_packet_t *eap_packet = (const eap_packet_t *) data;
+ if (data_len < 11) return 0;
+
/*
* Look for success or failure.
*/
}
}
+ RDEBUG("Unknown TLV %02x", data[10]);
+
return 0;
}
* If we authenticated the user, then it's OK.
*/
case PEAP_STATUS_SENT_TLV_SUCCESS:
- if (eappeap_check_tlv(request, data)) {
+ if (eappeap_check_tlv(request, data, data_len)) {
RDEBUG2("Success");
return RLM_MODULE_OK;
}