From nobody Wed May 3 00:29:56 2023 X-Original-To: dev-commits-src-branches@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 4Q9yWn1schz48NXF; Wed, 3 May 2023 00:29:57 +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 4Q9yWm6RDlz3nWp; Wed, 3 May 2023 00:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/TSHjB2I6mqy/JUubElbBSa8+797ZCyywPhzeIKnVI=; b=yhecbUEOtClNSagV/76UNqxcmx8UUo7TJG6NnjPNqi3E0y4QMq1AAED7hquQmc6l+jbNLN w8Yq2LG2SDhMYR3XqfWStAyhbKX6NnFKgMVNUS6vacJjFKwa62idRS5ShjzLBqD46L25Ct 9r9xTbZyO3cHecmttmGhJfCGHM/FpkGZkCeY2KuIG5qWdHUQZtZFYqSo5Qo/GJVrPubLIk kcB9KQvT4iam6UsydQ3l32B5UeSh5yjQZAqBMpTLcP9zvBS6NJOm4XzVqmA7wgXtXRTCQf 0ejJhT3XcTH8ShgOSAX213JjahYpYBYGgq++fqGrqhydD9Cn25Fb9FMGGqjKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/TSHjB2I6mqy/JUubElbBSa8+797ZCyywPhzeIKnVI=; b=JrUdkgp+/c3kdtm3iCm7Sk6mhKZjDy2OP8RW5WXv4YZFnnV2BSN8QDFiqV+geC6OEFHFyx hyLX2L34KEuP+C/ADEXNTBl89G0X1EHOTY2oXoYmyDlpHBc2WZq2UKzDipfsUK021B0MZo VHaUJ5kUxSTR5kaSF0z5mXfMlAeisXxtBJ9Y8UP5CqXwPsgDiAuWk7s8gj6rDbls1JRfyg E2VhfK6uvbSX1EztaHtkPn1VDIs2hUNb2JGnQMb1cVlD0OBeSSOrfbEQce90sc5jD6hzrs XKsdKi67dUV/U6EILJ/6lE9zMtFmMyU4N3XL80spHvrpc1DJiu14X0pXVkqW9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073796; a=rsa-sha256; cv=none; b=hB6snqABQtvZUjC+hu4H+A7rX+fzjDgDRuzgUTGR5fMq04D1hlfol8eBCtdXQzbhKL+3IF Tyiv4yye7n4gf+n+JekbnpWr/xVgukJGPd/Z21yCzGx2BF/rdmdES4lE+gHf/4psT/cF8+ JlthW/S8az4uPgodezn2Y9GVwi7C7CB3jTBZVHh4EC62EyV/t/YLX+fW76EiwK6oVIFsKK 4/XC7R1RvOdvRLfa1B8mxGsoyHlJ3jMB9Go/6fTAeL0iJI7jj0Ua6Lw53GmF51NJoCsHR6 QBWzmjLFqOY1luM1haINzqN0NxNvmN5qf9u6gyOv79Nxye29xQ4pyPyprIlYIg== 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 4Q9yWm5SMyz18J9; Wed, 3 May 2023 00:29:56 +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 3430Tun4072335; Wed, 3 May 2023 00:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TuCH072334; Wed, 3 May 2023 00:29:56 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:56 GMT Message-Id: <202305030029.3430TuCH072334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 65413a38270f - stable/13 - net80211: Fix mismatches in array bounds. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 65413a38270f074d1d3e4562718e95050dfd8452 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65413a38270f074d1d3e4562718e95050dfd8452 commit 65413a38270f074d1d3e4562718e95050dfd8452 Author: John Baldwin AuthorDate: 2022-12-07 20:31:53 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:21:13 +0000 net80211: Fix mismatches in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D37546 (cherry picked from commit 1f078120955947c85c54a8c088782ea5e4451eb5) --- sys/net80211/ieee80211_node.h | 2 +- sys/net80211/ieee80211_proto.h | 4 ++-- sys/net80211/ieee80211_scan.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 0e885440687c..5782d513de08 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -435,7 +435,7 @@ struct ieee80211_node * ieee80211_find_rxnode_withkey_debug( const struct ieee80211_frame_min *, uint16_t keyix, const char *func, int line); struct ieee80211_node *ieee80211_find_txnode_debug(struct ieee80211vap *, - const uint8_t *, + const uint8_t macaddr[IEEE80211_ADDR_LEN], const char *func, int line); #define ieee80211_free_node(ni) \ ieee80211_free_node_debug(ni, __func__, __LINE__) diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index 4b324caa694b..e9b5157716d4 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -459,8 +459,8 @@ void ieee80211_notify_cac(struct ieee80211com *, enum ieee80211_notify_cac_event); void ieee80211_notify_node_deauth(struct ieee80211_node *); void ieee80211_notify_node_auth(struct ieee80211_node *); -void ieee80211_notify_country(struct ieee80211vap *, const uint8_t [], - const uint8_t cc[2]); +void ieee80211_notify_country(struct ieee80211vap *, + const uint8_t [IEEE80211_ADDR_LEN], const uint8_t cc[2]); void ieee80211_notify_radio(struct ieee80211com *, int); void ieee80211_notify_ifnet_change(struct ieee80211vap *); #endif /* _NET80211_IEEE80211_PROTO_H_ */ diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 1e07aacfc201..50b3151063fa 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -607,7 +607,8 @@ ieee80211_scan_timeout(struct ieee80211com *ic) * Mark a scan cache entry after a successful associate. */ void -ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[]) +ieee80211_scan_assoc_success(struct ieee80211vap *vap, + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan; @@ -623,7 +624,7 @@ ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[]) */ void ieee80211_scan_assoc_fail(struct ieee80211vap *vap, - const uint8_t mac[], int reason) + const uint8_t mac[IEEE80211_ADDR_LEN], int reason) { struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan;