http://bugs.winehq.org/show_bug.cgi?id=24750
Summary: msvcrt _wgetenv crashes in DDO Online patchclient.dll Product: Wine Version: 1.3.4 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: edwintorok@gmail.com
appdb: http://appdb.winehq.org/objectManager.php?sClass=application&iId=2910
With latest wine it crashes here everytime (when running patch from PyLotro) (dlls/msvcrt/environ.c): for (environ = *environ_p; *environ; environ++)
This patch fixes the crash and allows patchclient.dll to continue:
diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index 6ceeebb..7687903 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -54,8 +54,11 @@ MSVCRT_wchar_t * CDECL _wgetenv(const MSVCRT_wchar_t *name) { MSVCRT_wchar_t **environ; unsigned int length=strlenW(name); + MSVCRT_wchar_t ***environ_p = __p__wenviron(); + if (!environ_p || !*environ_p) + return NULL;
- for (environ = *__p__wenviron(); *environ; environ++) + for (environ = *environ_p; *environ; environ++) { MSVCRT_wchar_t *str = *environ; MSVCRT_wchar_t *pos = strchrW(str,'=')
http://bugs.winehq.org/show_bug.cgi?id=24750
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #1 from Andrew Nguyen arethusa26@gmail.com 2010-10-15 02:27:14 CDT --- This is already fixed in the latest Git by commit eb094728709b08f42a3db13074a6105120da24cb; marking duplicate of bug 24635.
*** This bug has been marked as a duplicate of bug 24635 ***
http://bugs.winehq.org/show_bug.cgi?id=24750
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2010-10-15 10:10:08 CDT --- Closing duplicate.