summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
index 68c917ffd..8846fe3a4 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
@@ -1002,6 +1002,11 @@ public class WifiScanningServiceImpl extends IWifiScanner.Stub {
loge("could not get scan capabilities");
return HANDLED;
}
+ if (capabilities.max_scan_buckets <= 0) {
+ loge("invalid max buckets in scan capabilities "
+ + capabilities.max_scan_buckets);
+ return HANDLED;
+ }
mBackgroundScheduler.setMaxBuckets(capabilities.max_scan_buckets);
mBackgroundScheduler.setMaxApPerScan(capabilities.max_ap_cache_per_scan);