Skip to contentSkip to conversation

wifi: cfg80211: sme: store capped length in __cfg80211_connect_result()

PATCH In review Dan Carpenter 2 participants 3 messages Dec 3, 2025 – Dec 4, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: cfg80211: sme: store capped length in __cfg80211_connect_result()

The QGenie AI code review tool says we should store the capped length to wdev->u.client.ssid_len. The AI is correct.

Fixes 62b635dcd69c ("wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()")
---
 net/wireless/sme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/sme.c +1 -1
index 3a028ff287fb..4e629ca305bc 100644
@@ -910,7 +910,7 @@ void __cfg80211_connect_result(struct net_device *dev,
 
 			ssid_len = min(ssid->datalen, IEEE80211_MAX_SSID_LEN);
 			memcpy(wdev->u.client.ssid, ssid->data, ssid_len);
-			wdev->u.client.ssid_len = ssid->datalen;
+			wdev->u.client.ssid_len = ssid_len;
 			break;
 		}
 		rcu_read_unlock();
Signature · 1 line
2.51.0
#1 lore raw

Hello Dan,

Am 03.12.2025 um 12:14 schrieb Dan Carpenter:

Quoted 1 line

The QGenie AI code review tool

Could you tell us more about this tool? Is there a web page of this tool, how do you use this tool?

I found https://qgenie.ai/ but this is not a code review tool.

Rolf

Quoted 22 lines

says we should store the capped length to
wdev->u.client.ssid_len. The AI is correct.

Fixes 62b635dcd69c ("wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()")
---
  net/wireless/sme.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/sme.c +1 -1
index 3a028ff287fb..4e629ca305bc 100644
@@ -910,7 +910,7 @@ void __cfg80211_connect_result(struct net_device *dev,
 
  			ssid_len = min(ssid->datalen, IEEE80211_MAX_SSID_LEN);
  			memcpy(wdev->u.client.ssid, ssid->data, ssid_len);
-			wdev->u.client.ssid_len = ssid->datalen;
+			wdev->u.client.ssid_len = ssid_len;
  			break;
  		}
  		rcu_read_unlock();
#2 lore raw
Quoted 10 lines · Rolf Reintjes

Hello Dan,

Am 03.12.2025 um 12:14 schrieb Dan Carpenter:

Quoted 1 line

The QGenie AI code review tool

Could you tell us more about this tool? Is there a web page of this tool, how do you use this tool?

I found https://qgenie.ai/ but this is not a code review tool.

No idea. To be honest, I think it CC'd me by mistake.

regards,
dan carpenter