wireless/nl80211.c: fix uninitialized variable
Subsystems (3)
PATCH v2 1/1 wireless/nl80211.c: fix uninitialized variable
This change fix KMSAN uninit-value in net/wireless/nl80211.c:225 , That because of fixedlen variable uninitialized,So I initialized it by zero.
Reported-by [email protected]
Signed-off-by Alaa Emad <[email protected]>
---
Changes in v2:
- Make the commit message more clearer.
--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
@@ -210,7 +210,7 @@ static int validate_beacon_head(const struct nlattr *attr,const struct element *elem;const struct ieee80211_mgmt *mgmt = (void *)data;bool s1g_bcn =ieee80211_is_s1g_beacon (mgmt->frame_control); -unsigned int fixedlen, hdrlen; +unsigned int fixedlen =0 , hdrlen;if (s1g_bcn) { fixedlen = offsetof(struct ieee80211_ext,
Signature · 1 line
2.25.1
Quoted 17 lines · Alaa Emad
This change fix KMSAN uninit-value in
net/wireless/nl80211.c:225, That because offixedlenvariable uninitialized,So I initialized it by zero.Reported-by [email protected]Signed-off-by Alaa Emad <[email protected]>---
Changes in v2:
- Make the commit message more clearer.--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/wireless/nl80211.c +0
-0
net/wireless/nl80211.c static int validate_beacon_head(const struct nlattr *attr, · line 213
Quoted 5 lines
net/wireless/nl80211.c +1
-1@@ -210,7 +210,7 @@ static int validate_beacon_head(const struct nlattr *attr,const struct element *elem;const struct ieee80211_mgmt *mgmt = (void *)data;bool s1g_bcn =ieee80211_is_s1g_beacon (mgmt->frame_control); -unsigned int fixedlen, hdrlen; +unsigned int fixedlen =0 , hdrlen;
Please always use scripts/checkpatch.pl before sending out patches. It would have pointed out that this line is incorrect and needs to be fixed up :(
thanks,
greg k-h