Browse Source

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
Himanshu Agarwal 7 years ago
parent
commit
c422ca7c04
1 changed files with 8 additions and 1 deletions
  1. 8 1
      core/mac/src/pe/lim/lim_send_management_frames.c

+ 8 - 1
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -2350,7 +2350,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,