Commit d05fabb6 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

advapi32: Eliminate wild pointers.

parent 70797560
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment