From 64987377c23fdc4c6fe7e907d32f9f9580c1c128 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Fri, 20 Jul 2018 02:17:19 +0000 Subject: [PATCH] To reduce our diff between our sources and our upline, sync up with upline. Also making it easier to read. Obtained from: diffing base with ports X-MFC-with: r336203 --- contrib/wpa/wpa_supplicant/wnm_sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/wpa/wpa_supplicant/wnm_sta.c b/contrib/wpa/wpa_supplicant/wnm_sta.c index 8307f338af7f..67a07ff7b1e7 100644 --- a/contrib/wpa/wpa_supplicant/wnm_sta.c +++ b/contrib/wpa/wpa_supplicant/wnm_sta.c @@ -198,8 +198,8 @@ static void wnm_sleep_mode_exit_success(struct wpa_supplicant *wpa_s, return; } - while (ptr + 1 < end) { - if (ptr + 2 + ptr[1] > end) { + while (end - ptr > 1) { + if (2 + ptr[1] > end - ptr) { wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element " "length"); if (end > ptr) {