secur32: Assign to structs instead of using memcpy.
This commit is contained in:
parent
bd0fec2511
commit
599f58cc7c
|
@ -745,7 +745,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
|
||||||
{
|
{
|
||||||
PSecPkgInfoW pkgInfo = *ppPackageInfo + i++;
|
PSecPkgInfoW pkgInfo = *ppPackageInfo + i++;
|
||||||
|
|
||||||
memcpy(pkgInfo, &package->infoW, sizeof(SecPkgInfoW));
|
*pkgInfo = package->infoW;
|
||||||
if (package->infoW.Name)
|
if (package->infoW.Name)
|
||||||
{
|
{
|
||||||
TRACE("Name[%d] = %s\n", i - 1, debugstr_w(package->infoW.Name));
|
TRACE("Name[%d] = %s\n", i - 1, debugstr_w(package->infoW.Name));
|
||||||
|
|
|
@ -45,7 +45,7 @@ static SECURITY_STATUS SECUR32_makeSecHandle(PSecHandle phSec,
|
||||||
|
|
||||||
if (newSec)
|
if (newSec)
|
||||||
{
|
{
|
||||||
memcpy(newSec, realHandle, sizeof(*realHandle));
|
*newSec = *realHandle;
|
||||||
phSec->dwUpper = (ULONG_PTR)package;
|
phSec->dwUpper = (ULONG_PTR)package;
|
||||||
phSec->dwLower = (ULONG_PTR)newSec;
|
phSec->dwLower = (ULONG_PTR)newSec;
|
||||||
ret = SEC_E_OK;
|
ret = SEC_E_OK;
|
||||||
|
@ -778,7 +778,7 @@ SECURITY_STATUS WINAPI QuerySecurityPackageInfoW(SEC_WCHAR *pszPackageName,
|
||||||
PWSTR nextString = (PWSTR)((PBYTE)*ppPackageInfo +
|
PWSTR nextString = (PWSTR)((PBYTE)*ppPackageInfo +
|
||||||
sizeof(SecPkgInfoW));
|
sizeof(SecPkgInfoW));
|
||||||
|
|
||||||
memcpy(*ppPackageInfo, &package->infoW, sizeof(package->infoW));
|
**ppPackageInfo = package->infoW;
|
||||||
if (package->infoW.Name)
|
if (package->infoW.Name)
|
||||||
{
|
{
|
||||||
(*ppPackageInfo)->Name = nextString;
|
(*ppPackageInfo)->Name = nextString;
|
||||||
|
|
Loading…
Reference in New Issue