Skip to contentSkip to conversation

cfg80211: minimal error handling for wext-compat freq scanning

PATCH New Holger Schurig 1 participant 1 message Sep 11, 2009 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfg80211: minimal error handling for wext-compat freq scanning

net/wireless/scan.c +5 -0
Index: linux-wl/net/wireless/scan.c
===================================================================
@@ -680,6 +680,11 @@ int cfg80211_wext_siwscan(struct net_dev
 		err = -EINVAL;
 		goto out;
 	}
+	/* No channels found? */
+	if (!i) {
+		err = -EINVAL;
+		goto out;
+	}
 
 	/* Set real number of channels specified in creq->channels[] */
 	creq->n_channels = i;
Signature · 1 line
http://www.holgerschurig.de