Takes advantage of coverity thinking fr_nbo_to_foo() taints
the passed pointer, which here is it's only use, while the
returned value is used several times.
*/
#include <freeradius-devel/server/pair.h>
#include <freeradius-devel/radius/radius.h>
+#include <freeradius-devel/util/nbo.h>
#include "attrs.h"
#include "compose.h"
(eap_packet->code != FR_EAP_CODE_RESPONSE) ||
(eap_packet->data[0] != FR_EAP_METHOD_IDENTITY)) return NULL;
- memcpy(&len, eap_packet->length, sizeof(uint16_t));
- len = ntohs(len);
+ len = fr_nbo_to_uint16(eap_packet->length);
/*
* Note: The minimum length here is 5.