From 281ff42a01b6648a56f70f3a805a3f0bd478d26f Mon Sep 17 00:00:00 2001 From: Andrei Otcheretianski Date: Wed, 5 Nov 2014 03:50:35 -0500 Subject: [PATCH] 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 --- src/eap_common/ikev2_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eap_common/ikev2_common.c b/src/eap_common/ikev2_common.c index 4b5e66544..262d9ab1e 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;