EAP-IKEv2: Fix compilation warning
Fix signed/unsigned comparison compilation warning introduced in
08ef442
"EAP-IKEv2: Fix the payload parser".
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
d10792199e
commit
281ff42a01
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ int ikev2_parse_payloads(struct ikev2_payloads *payloads,
|
||||||
}
|
}
|
||||||
phdr = (const struct ikev2_payload_hdr *) pos;
|
phdr = (const struct ikev2_payload_hdr *) pos;
|
||||||
plen = WPA_GET_BE16(phdr->payload_length);
|
plen = WPA_GET_BE16(phdr->payload_length);
|
||||||
if (plen < sizeof(*phdr) || plen > end - pos) {
|
if (plen < sizeof(*phdr) || pos + plen > end) {
|
||||||
wpa_printf(MSG_INFO, "IKEV2: Invalid payload header "
|
wpa_printf(MSG_INFO, "IKEV2: Invalid payload header "
|
||||||
"length %d", plen);
|
"length %d", plen);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue