http://bugs.winehq.org/show_bug.cgi?id=11168
--- Comment #6 from Anastasius Focht focht@gmx.net 2008-01-14 04:56:02 --- Created an attachment (id=10241) --> (http://bugs.winehq.org/attachment.cgi?id=10241) patch which adds message id 2221 resource to fix crash for NERR_UserNotFound
Hello,
the crash is due to wine missing system message resource and sloppy application programming.
Netapi isn't fleshed out yet to support this type of network user functions so returning error in NetUserChangePassword() seems reasonable. Despite what NetUserChangePassword() api name might imply - this call is just used to verify if given NT user login credentials (username + password) are correct (for later use).
The application tries to translate NERR_UserNotFound by making the following call:
--- snip --- FormatMessageA (0x1300,(nil),2221,0x400,0x34d604,128,(nil)) --- snip ---
The FormatMessageA call fails because wine doesn't define this message resource (last error: ERROR_RESOURCE_LANG_NOT_FOUND). The application doesn't check the return code and straight accesses the system allocated buffer (which isn't allocated at all because the resource is not defined), causing the crash.
The following patch should fix the crash, correctly returning message resource. French and korean message resource use their english counterpart (there are lots of untranslated ones so no harm).
Regards