srvmgr: Fix issue with memcopy
[ipc/ipcdev.git] / packages / ti / srvmgr / ServiceMgr.c
index 08f2de9cd2e124177bf7fb3a5c1af560a1754a9c..bf193abac4407df80e69cbfbe2990cd817c1c583 100644 (file)
@@ -151,8 +151,8 @@ Bool ServiceMgr_registerSrvTask(UInt16 reserved, Task_FuncPtr func,
             /* Deal with the Task_Params to avoid IInstance mismatch */
             params = &st->params;
             Task_Params_init(params);
-            memcpy((Void *)(params), taskParams,
-                        sizeof(*params));
+            memcpy((Void *)(&params->arg0), &taskParams->arg0,
+                        sizeof(*params) - ((UArg)&taskParams->arg0-(UArg)taskParams));
             params->instance->name = st->name;
 
             st->reserved = reserved;