wlan: Fix for Memory Trailer Corruption

While doing the memcpy instead of using the size of the union, taking
the corespomding size based on the version

Change-Id: I6026294456d288b3bd2148d79f8098e4ca7870a2
CR-Fixed: 416658
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index ce47b2b..90409f8 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -10472,10 +10472,10 @@
 
   /* Need to fill in the BSS index */
   halConfigStaReqMsg.uStaParams.configStaParams.bssIdx = pBSSSes->ucBSSIdx;
-
+  
   wpalMemoryCopy( pSendBuffer+usDataOffset,
                   &halConfigStaReqMsg.uStaParams,
-                  sizeof(halConfigStaReqMsg.uStaParams));
+                  uMsgSize);
 
   pWDICtx->wdiReqStatusCB     = pwdiConfigSTAParams->wdiReqStatusCB;
   pWDICtx->pReqStatusUserData = pwdiConfigSTAParams->pUserData;