summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInsun Song <insun.song@broadcom.com>2017-02-08 21:42:58 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-02-08 21:42:58 +0000
commitf642514eb305d477e535470898b06c42321da61b (patch)
treec99c01b6848a8f4c5b690be9f0d9de185b0739f6
parent0c97e9a22bac14481e3d6407f82a9655102128f7 (diff)
parent5a434343e3515e2c1e29b879ed67898206016f3f (diff)
downloadhardware_replicant_wlan-f642514eb305d477e535470898b06c42321da61b.tar.gz
hardware_replicant_wlan-f642514eb305d477e535470898b06c42321da61b.tar.bz2
hardware_replicant_wlan-f642514eb305d477e535470898b06c42321da61b.zip
net: wireless: bcmdhd: fix buffer overrun in ePNOCommand
am: 5a434343e3 Change-Id: If4585f15ddc77b5fb7e33d5317f44733b3b2ddb9
-rw-r--r--bcmdhd/wifi_hal/gscan.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/bcmdhd/wifi_hal/gscan.cpp b/bcmdhd/wifi_hal/gscan.cpp
index 620fbe4..cd61d5a 100644
--- a/bcmdhd/wifi_hal/gscan.cpp
+++ b/bcmdhd/wifi_hal/gscan.cpp
@@ -1174,6 +1174,10 @@ public:
}
}
int createSetupRequest(WifiRequest& request) {
+ if (epno_params.num_networks > MAX_EPNO_NETWORKS) {
+ ALOGE("wrong epno num_networks:%d", epno_params.num_networks);
+ return WIFI_ERROR_INVALID_ARGS;
+ }
int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_EPNO_SSID);
if (result < 0) {
return result;