advapi32: Eliminate wild pointers.

This commit is contained in:
Andrew Talbot 2006-12-04 22:53:25 +00:00 committed by Alexandre Julliard
parent 70797560b7
commit d05fabb660
1 changed files with 3 additions and 2 deletions

View File

@ -446,7 +446,8 @@ NTSTATUS WINAPI LsaQueryInformationPolicy(
* All other fields are zero.
*/
PPOLICY_PRIMARY_DOMAIN_INFO pinfo;
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), (char*)&pinfo->Name - (char*)pinfo);
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name));
TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
@ -497,7 +498,7 @@ NTSTATUS WINAPI LsaQueryInformationPolicy(
*/
PPOLICY_DNS_DOMAIN_INFO pinfo;
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), (char*)&pinfo->Name - (char*)pinfo);
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name));
TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));