aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-11-05 08:50:35 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-15 09:41:09 (GMT)
commit281ff42a01b6648a56f70f3a805a3f0bd478d26f (patch)
treeff7ef29f593cd49979b12e438dbf9fb334ed4185 /src/eap_common
parentd10792199e36f357fb82d191ec7bfc6d9daa9e1c (diff)
downloadhostap-281ff42a01b6648a56f70f3a805a3f0bd478d26f.zip
hostap-281ff42a01b6648a56f70f3a805a3f0bd478d26f.tar.gz
hostap-281ff42a01b6648a56f70f3a805a3f0bd478d26f.tar.bz2
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>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/ikev2_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_common/ikev2_common.c b/src/eap_common/ikev2_common.c
index 4b5e665..262d9ab 100644
--- a/src/eap_common/ikev2_common.c
+++ b/src/eap_common/ikev2_common.c
@@ -263,7 +263,7 @@ int ikev2_parse_payloads(struct ikev2_payloads *payloads,
}
phdr = (const struct ikev2_payload_hdr *) pos;
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 "
"length %d", plen);
return -1;