You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pDnsRecord parameter of PDNS_SERVICE_BROWSE_CALLBACK (Which is a field of DNS_SERVICE_BROWSE_REQUEST) points to DNS_RECORDA
Expected behavior
The pDnsRecord parameter of PDNS_SERVICE_BROWSE_CALLBACK (Which is a field of DNS_SERVICE_BROWSE_REQUEST) points to DNS_RECORDW
Repro steps
NativeMethods.txt content:
DnsServiceBrowse
Due to a bug in the dns header, this function only works if UNICODE is defined, causing the DNS_RECORD field in the PDNS_SERVICE_BROWSE_CALLBACK parameter to be a DNS_RECORDW. The DNS code always passes a DNS_RECORDW to the callback, so a caller expecting DNS_RECORDA will see bad string values. DNS_SERVICE_BROWSE_REQUEST needs to always assume UNICODE is defined and use DNS_RECORDW.
Context
CsWin32 version: [e.g. 0.1.619-beta]
Target Framework: [e.g. net6.0]
The text was updated successfully, but these errors were encountered:
I'd take another look at this fix. The parameter not only changed type but also dropped the pointer from its signature. That seems to not line up with the headers.
Actual behavior
The pDnsRecord parameter of
PDNS_SERVICE_BROWSE_CALLBACK
(Which is a field ofDNS_SERVICE_BROWSE_REQUEST
) points toDNS_RECORDA
Expected behavior
The pDnsRecord parameter of
PDNS_SERVICE_BROWSE_CALLBACK
(Which is a field ofDNS_SERVICE_BROWSE_REQUEST
) points toDNS_RECORDW
Repro steps
NativeMethods.txt
content:Due to a bug in the dns header, this function only works if UNICODE is defined, causing the DNS_RECORD field in the PDNS_SERVICE_BROWSE_CALLBACK parameter to be a DNS_RECORDW. The DNS code always passes a DNS_RECORDW to the callback, so a caller expecting DNS_RECORDA will see bad string values.
DNS_SERVICE_BROWSE_REQUEST
needs to always assume UNICODE is defined and use DNS_RECORDW.Context
0.1.619-beta
]net6.0
]The text was updated successfully, but these errors were encountered: