summaryrefslogtreecommitdiff
path: root/qcwcn
diff options
context:
space:
mode:
Diffstat (limited to 'qcwcn')
-rw-r--r--qcwcn/wifi_hal/wifi_hal.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qcwcn/wifi_hal/wifi_hal.cpp b/qcwcn/wifi_hal/wifi_hal.cpp
index cb770ee..61f7ee6 100644
--- a/qcwcn/wifi_hal/wifi_hal.cpp
+++ b/qcwcn/wifi_hal/wifi_hal.cpp
@@ -1291,6 +1291,12 @@ static int register_monitor_sock(wifi_handle handle, wifihal_ctrl_req_t *ctrl_ms
if(attach)
{
+ if (ctrl_msg->monsock_len > sizeof(struct sockaddr_un))
+ {
+ ALOGE("%s: Invalid monitor socket length \n", __FUNCTION__);
+ return -3;
+ }
+
nreg = (wifihal_mon_sock_t *)malloc(sizeof(*reg) + match_len);
if (!nreg)
return -1;