diff options
author | Ajit Vaishya <ajitv@codeaurora.org> | 2017-03-16 15:43:10 +0530 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-03-30 10:55:26 -0700 |
commit | e6476a16ebe0f818b80dcb627193f62528344640 (patch) | |
tree | d9a9585b3f7a05195ed713ec9fd4f58e5259639a /qcwcn/wifi_hal/wifilogger_diag.cpp | |
parent | 370564aa2f05afbb333745293f6d80b52d9d6433 (diff) | |
download | wlan-e6476a16ebe0f818b80dcb627193f62528344640.tar.gz |
WiFi-Hal: memset cap_vendor_data before populating data to it.
WiFiHAL populates data to cap_vendor_data elements when diag event
LOG_WLAN_EXTSCAN_CAPABILITIES is received. memset the buffer zero
before populating to it, to make sure no invalid data is sent to
framework.
CRs-Fixed: 2020507
Change-Id: Ifc9e8b7a777d8698bc61b139ef5ede20d083cde2
Bug: 76133856
(cherry-picked from 6883d36b6a0af69e5e3860efcc0dd38799626b34)
Diffstat (limited to 'qcwcn/wifi_hal/wifilogger_diag.cpp')
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp index d131102..bbdeb7c 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.cpp +++ b/qcwcn/wifi_hal/wifilogger_diag.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015, 2018 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -136,6 +136,7 @@ static wifi_error process_log_extscan_capabilities(hal_info *info, pRingBufferEntry = (wifi_ring_buffer_entry *)&out_buf[0]; memset(pRingBufferEntry, 0, SCAN_CAP_ENTRY_SIZE); + memset(&cap_vendor_data, 0, sizeof(gscan_capabilities_vendor_data_t)); pConnectEvent = (wifi_ring_buffer_driver_connectivity_event *) (pRingBufferEntry + 1); @@ -701,6 +702,8 @@ static wifi_error process_roam_event(hal_info *info, u32 id, roam_candidate_found_vendor_data_t roamCandidateFoundVendata; pConnectEvent->event = WIFI_EVENT_ROAM_CANDIDATE_FOUND; pRoamCandidateFound = (wlan_roam_candidate_found_payload_type *)buf; + memset(&roamCandidateFoundVendata, 0, + sizeof(roam_candidate_found_vendor_data_t)); pTlv = &pConnectEvent->tlvs[0]; pTlv = addLoggerTlv(WIFI_TAG_CHANNEL, sizeof(pRoamCandidateFound->channel), |