Skip to contentSkip to conversation

ath9k: fix wrong string size for strncmp in write_file_spec_scan_ctl()

PATCH New Maks Naumov 1 participant 1 message Aug 16, 2014 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: fix wrong string size for strncmp in write_file_spec_scan_ctl()

---
 drivers/net/wireless/ath/ath9k/spectral.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/spectral.c +1 -1
index 5fe29b9..8f68426 100644
@@ -253,7 +253,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file,
 
 	if (strncmp("trigger", buf, 7) == 0) {
 		ath9k_spectral_scan_trigger(sc->hw);
-	} else if (strncmp("background", buf, 9) == 0) {
+	} else if (strncmp("background", buf, 10) == 0) {
 		ath9k_spectral_scan_config(sc->hw, SPECTRAL_BACKGROUND);
 		ath_dbg(common, CONFIG, "spectral scan: background mode enabled\n");
 	} else if (strncmp("chanscan", buf, 8) == 0) {
Signature · 1 line
1.9.1