Parcourir la source

qcacld-3.0: Input validation for RSSI Delta for TDLS Config

Validating input for RSSI Delta for TDLS configuration in
the function wlan_hdd_tdls_check_config().

Change-Id: I74c00db19dc28f363fe4e349b2bd94440bfc9238
CRs-Fixed: 1102929
Nitesh Shah il y a 8 ans
Parent
commit
757435ed38
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      core/hdd/src/wlan_hdd_tdls.c

+ 8 - 0
core/hdd/src/wlan_hdd_tdls.c

@@ -1525,6 +1525,14 @@ static int wlan_hdd_tdls_check_config(tdls_config_params_t *config)
 			CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX);
 		return -EINVAL;
 	}
+	if (config->rssi_delta < CFG_TDLS_RSSI_DELTA_MIN
+	    || config->rssi_delta > CFG_TDLS_RSSI_DELTA_MAX) {
+		hdd_err("Invalid 11th argument %d. <%d...%d>",
+			config->rssi_delta,
+			CFG_TDLS_RSSI_DELTA_MIN,
+			CFG_TDLS_RSSI_DELTA_MAX);
+		return -EINVAL;
+	}
 	return 0;
 }