Browse Source

engine: client: cl_securedstub: fix strict aliasing in secured module initializing

pull/2/head
Alibek Omarov 2 years ago
parent
commit
fec3d33dcf
  1. 9
      engine/client/cl_securedstub.c

9
engine/client/cl_securedstub.c

@ -405,12 +405,15 @@ static cldll_func_dst_t cldllFuncDst = @@ -405,12 +405,15 @@ static cldll_func_dst_t cldllFuncDst =
void CL_GetSecuredClientAPI( CL_EXPORT_FUNCS F )
{
cldll_func_src_t cldllFuncSrc = { 0 };
modfuncs_t modFuncs = { 0 };
// secured client dlls need these
*(cldll_func_dst_t **)&cldllFuncSrc.pfnVidInit = &cldllFuncDst;
*(modfuncs_t **)&cldllFuncSrc.pfnInitialize = &modFuncs;
cldll_func_src_t cldllFuncSrc =
{
(void *)&modFuncs,
NULL,
(void *)&cldllFuncDst
};
// trying to fill interface now
F( &cldllFuncSrc );

Loading…
Cancel
Save