Fixed size_t printf format for 64-bit targets
This commit is contained in:
parent
8e8df25541
commit
dd20838a7d
2 changed files with 17 additions and 10 deletions
|
@ -1030,20 +1030,21 @@ static void eap_fast_process_phase2_eap(struct eap_sm *sm,
|
||||||
hdr = (struct eap_hdr *) in_data;
|
hdr = (struct eap_hdr *) in_data;
|
||||||
if (in_len < (int) sizeof(*hdr)) {
|
if (in_len < (int) sizeof(*hdr)) {
|
||||||
wpa_printf(MSG_INFO, "EAP-FAST: Too short Phase 2 "
|
wpa_printf(MSG_INFO, "EAP-FAST: Too short Phase 2 "
|
||||||
"EAP frame (len=%d)", in_len);
|
"EAP frame (len=%lu)", (unsigned long) in_len);
|
||||||
eap_fast_req_failure(sm, data);
|
eap_fast_req_failure(sm, data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
len = be_to_host16(hdr->length);
|
len = be_to_host16(hdr->length);
|
||||||
if (len > in_len) {
|
if (len > in_len) {
|
||||||
wpa_printf(MSG_INFO, "EAP-FAST: Length mismatch in "
|
wpa_printf(MSG_INFO, "EAP-FAST: Length mismatch in "
|
||||||
"Phase 2 EAP frame (len=%d hdr->length=%d)",
|
"Phase 2 EAP frame (len=%lu hdr->length=%lu)",
|
||||||
in_len, len);
|
(unsigned long) in_len, (unsigned long) len);
|
||||||
eap_fast_req_failure(sm, data);
|
eap_fast_req_failure(sm, data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wpa_printf(MSG_DEBUG, "EAP-FAST: Received Phase 2: code=%d "
|
wpa_printf(MSG_DEBUG, "EAP-FAST: Received Phase 2: code=%d "
|
||||||
"identifier=%d length=%d", hdr->code, hdr->identifier, len);
|
"identifier=%d length=%lu", hdr->code, hdr->identifier,
|
||||||
|
(unsigned long) len);
|
||||||
switch (hdr->code) {
|
switch (hdr->code) {
|
||||||
case EAP_CODE_RESPONSE:
|
case EAP_CODE_RESPONSE:
|
||||||
eap_fast_process_phase2_response(sm, data, (u8 *) hdr, len);
|
eap_fast_process_phase2_response(sm, data, (u8 *) hdr, len);
|
||||||
|
|
|
@ -433,7 +433,9 @@ static void eap_gpsk_process_gpsk_2(struct eap_sm *sm,
|
||||||
miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
|
miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
|
||||||
if (end - pos < (int) miclen) {
|
if (end - pos < (int) miclen) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
|
||||||
"(left=%d miclen=%d)", end - pos, miclen);
|
"(left=%lu miclen=%lu)",
|
||||||
|
(unsigned long) (end - pos),
|
||||||
|
(unsigned long) miclen);
|
||||||
eap_gpsk_state(data, FAILURE);
|
eap_gpsk_state(data, FAILURE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -454,8 +456,9 @@ static void eap_gpsk_process_gpsk_2(struct eap_sm *sm,
|
||||||
pos += miclen;
|
pos += miclen;
|
||||||
|
|
||||||
if (pos != end) {
|
if (pos != end) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra "
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra "
|
||||||
"data in the end of GPSK-2", end - pos);
|
"data in the end of GPSK-2",
|
||||||
|
(unsigned long) (end - pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
eap_gpsk_state(data, GPSK_3);
|
eap_gpsk_state(data, GPSK_3);
|
||||||
|
@ -499,7 +502,9 @@ static void eap_gpsk_process_gpsk_4(struct eap_sm *sm,
|
||||||
miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
|
miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
|
||||||
if (end - pos < (int) miclen) {
|
if (end - pos < (int) miclen) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
|
||||||
"(left=%d miclen=%d)", end - pos, miclen);
|
"(left=%lu miclen=%lu)",
|
||||||
|
(unsigned long) (end - pos),
|
||||||
|
(unsigned long) miclen);
|
||||||
eap_gpsk_state(data, FAILURE);
|
eap_gpsk_state(data, FAILURE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -520,8 +525,9 @@ static void eap_gpsk_process_gpsk_4(struct eap_sm *sm,
|
||||||
pos += miclen;
|
pos += miclen;
|
||||||
|
|
||||||
if (pos != end) {
|
if (pos != end) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra "
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra "
|
||||||
"data in the end of GPSK-4", end - pos);
|
"data in the end of GPSK-4",
|
||||||
|
(unsigned long) (end - pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
eap_gpsk_state(data, SUCCESS);
|
eap_gpsk_state(data, SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue