From nobody Fri Oct 08 11:25:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4CC9517F1865; Fri, 8 Oct 2021 11:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HQm8G1jVtz3jYL; Fri, 8 Oct 2021 11:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 166612632C; Fri, 8 Oct 2021 11:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 198BPXRH026389; Fri, 8 Oct 2021 11:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 198BPXDN026388; Fri, 8 Oct 2021 11:25:33 GMT (envelope-from git) Date: Fri, 8 Oct 2021 11:25:33 GMT Message-Id: <202110081125.198BPXDN026388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0525ece3554e - main - net80211: fix build for 526370fb85db4b659cff4625eb2f379acaa4a1a8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0525ece3554edce14fa68a7fb61078ae2110c44b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0525ece3554edce14fa68a7fb61078ae2110c44b commit 0525ece3554edce14fa68a7fb61078ae2110c44b Author: Bjoern A. Zeeb AuthorDate: 2021-10-08 11:21:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-10-08 11:21:44 +0000 net80211: fix build for 526370fb85db4b659cff4625eb2f379acaa4a1a8 In 526370fb85db4b659cff4625eb2f379acaa4a1a8 "net80211: proper ssid length check in setmlme_assoc_adhoc()" we are checking the sizeof on an array function parameter which leads to a warning that it will resturn the size of the type of the array rather than the array size itself. Use the defined length used both in the ioctl and the sizing of the array function parameter instead. Reported by: CI MFC after: 3 days X-MFC with: 526370fb85db4b659cff4625eb2f379acaa4a1a8 --- sys/net80211/ieee80211_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index b0339d996999..419518eb1224 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1591,7 +1591,7 @@ setmlme_assoc_adhoc(struct ieee80211vap *vap, ("expected opmode IBSS or AHDEMO not %s", ieee80211_opmode_name[vap->iv_opmode])); - if (ssid_len == 0 || ssid_len > sizeof(ssid)) + if (ssid_len == 0 || ssid_len > IEEE80211_NWID_LEN) return EINVAL; sr = IEEE80211_MALLOC(sizeof(*sr), M_TEMP,