http://bugs.winehq.org/show_bug.cgi?id=10612
Summary: LookupAccountNameA returns Domain Size that is one byte too big Product: Wine Version: 0.9.49. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-advapi32 AssignedTo: wine-bugs@winehq.org ReportedBy: lehmannd@in.tum.de
When calling LookupAccountNameA in Windows, cbReferencedDomainName is set to the number of characters in the string (e.g. for "DOMAIN" windows returns 6). In my tests Wine always returned the string "DOMAIN" and the length 7.
I think the bug is in there because LookupAccountNameW is called internally but that function is supposed to return the number of characters plus 1.
I confirmed the behaviour in Vista and Windows 2000.
I will try to fix it myself.