summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2017-09-19 11:07:36 +0530
committersnandini <snandini@codeaurora.org>2017-09-19 12:06:44 -0700
commit872788929eeee6b9fb07006b08e1aebfd9faeebe (patch)
treea3d8d79d531114f2195231dfd6ae4596720ee27f
parent8f8f9a5370012585243e40a4ce3014e2f8dbcb57 (diff)
qcacld-3.0: Copy the contents of auth frame properly
Copy the contents of auth frame in a proper manner in lim_send_auth_mgmt_frame(). Change-Id: I5197634e36fa5b4344fc71fc22e1de6a2147744d CRS-Fixed: 2112170
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 4a73e4083e19..4bc932ef0b75 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -2305,7 +2305,14 @@ alloc_packet:
if (challenge_req) {
if (body_len < SIR_MAC_AUTH_CHALLENGE_BODY_LEN) {
- qdf_mem_copy(body, (uint8_t *)&auth_frame->type,
+ /* copy challenge IE id, len, challenge text */
+ *body = auth_frame->type;
+ body++;
+ body_len -= sizeof(uint8_t);
+ *body = auth_frame->length;
+ body++;
+ body_len -= sizeof(uint8_t);
+ qdf_mem_copy(body, auth_frame->challengeText,
body_len);
pe_err("Incomplete challenge info: length: %d, expected: %d",
body_len,