fix 802.11 Station Key IE handling
memsetting the data to zero right after assigning them is obviously wrong
This commit is contained in:
parent
0e19b53e28
commit
a131e17a6e
@ -39,7 +39,9 @@ static void capwap_80211_stationkey_element_create(void* data, capwap_message_el
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
static void* capwap_80211_stationkey_element_parsing(capwap_message_elements_handle handle, struct capwap_read_message_elements_ops* func) {
|
static void* capwap_80211_stationkey_element_parsing(capwap_message_elements_handle handle,
|
||||||
|
struct capwap_read_message_elements_ops* func)
|
||||||
|
{
|
||||||
unsigned short length;
|
unsigned short length;
|
||||||
struct capwap_80211_stationkey_element* data;
|
struct capwap_80211_stationkey_element* data;
|
||||||
|
|
||||||
@ -53,10 +55,11 @@ static void* capwap_80211_stationkey_element_parsing(capwap_message_elements_han
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
data = (struct capwap_80211_stationkey_element*)capwap_alloc(sizeof(struct capwap_80211_stationkey_element));
|
data = (struct capwap_80211_stationkey_element *)
|
||||||
|
capwap_alloc(sizeof(struct capwap_80211_stationkey_element));
|
||||||
|
memset(data, 0, sizeof(struct capwap_80211_stationkey_element));
|
||||||
data->keylength = length - 20;
|
data->keylength = length - 20;
|
||||||
data->key = (uint8_t*)capwap_alloc(data->keylength);
|
data->key = (uint8_t*)capwap_alloc(data->keylength);
|
||||||
memset(data, 0, sizeof(struct capwap_80211_stationkey_element));
|
|
||||||
|
|
||||||
/* Retrieve data */
|
/* Retrieve data */
|
||||||
func->read_block(handle, data->address, MACADDRESS_EUI48_LENGTH);
|
func->read_block(handle, data->address, MACADDRESS_EUI48_LENGTH);
|
||||||
|
Loading…
Reference in New Issue
Block a user