git: 65413a38270f - stable/13 - net80211: Fix mismatches in array bounds.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 May 2023 00:29:56 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=65413a38270f074d1d3e4562718e95050dfd8452
commit 65413a38270f074d1d3e4562718e95050dfd8452
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-07 20:31:53 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
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;