From owner-svn-src-all@freebsd.org Fri Jul 20 02:17:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC824102B928; Fri, 20 Jul 2018 02:17:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93CBC8757F; Fri, 20 Jul 2018 02:17:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B5441AAE; Fri, 20 Jul 2018 02:17:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6K2HKcd026056; Fri, 20 Jul 2018 02:17:20 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K2HKvJ026055; Fri, 20 Jul 2018 02:17:20 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807200217.w6K2HKvJ026055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 Jul 2018 02:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336530 - head/contrib/wpa/wpa_supplicant X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/wpa_supplicant X-SVN-Commit-Revision: 336530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:17:21 -0000 Author: cy Date: Fri Jul 20 02:17:19 2018 New Revision: 336530 URL: https://svnweb.freebsd.org/changeset/base/336530 Log: 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 Modified: head/contrib/wpa/wpa_supplicant/wnm_sta.c Modified: head/contrib/wpa/wpa_supplicant/wnm_sta.c ============================================================================== --- head/contrib/wpa/wpa_supplicant/wnm_sta.c Fri Jul 20 02:04:10 2018 (r336529) +++ head/contrib/wpa/wpa_supplicant/wnm_sta.c Fri Jul 20 02:17:19 2018 (r336530) @@ -198,8 +198,8 @@ static void wnm_sleep_mode_exit_success(struct wpa_sup 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) {