|
@@ -1060,7 +1060,7 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
|
|
{
|
|
|
uint8_t *body_ptr, key_id, cfg_privacy_opt_imp;
|
|
|
uint8_t defaultkey[SIR_MAC_KEY_LENGTH];
|
|
|
- uint8_t plainbody[LIM_ENCR_AUTH_BODY_LEN];
|
|
|
+ uint8_t *plainbody = NULL;
|
|
|
uint8_t decrypt_result;
|
|
|
uint16_t frame_len, curr_seq_num = 0;
|
|
|
uint32_t val, key_length = 8;
|
|
@@ -1127,6 +1127,13 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
|
|
goto free;
|
|
|
}
|
|
|
|
|
|
+ plainbody = qdf_mem_malloc(LIM_ENCR_AUTH_BODY_LEN);
|
|
|
+ if (!plainbody) {
|
|
|
+ pe_err("failed to allocate memory for plainbody");
|
|
|
+ goto free;
|
|
|
+ }
|
|
|
+ qdf_mem_zero(plainbody, LIM_ENCR_AUTH_BODY_LEN);
|
|
|
+
|
|
|
/*
|
|
|
* Determine if WEP bit is set in the FC or received MAC header
|
|
|
* Note: WEP bit is set in FC of MAC header.
|
|
@@ -1403,6 +1410,8 @@ free:
|
|
|
qdf_mem_free(auth_frame);
|
|
|
if (rx_auth_frame)
|
|
|
qdf_mem_free(rx_auth_frame);
|
|
|
+ if (plainbody)
|
|
|
+ qdf_mem_free(plainbody);
|
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------------------------
|