[Bug 245] New: Builtin msvcrt does not set the environment properly

Wine Bugs wine-bugs at winehq.org
Thu Apr 6 10:39:23 CDT 2006


http://bugs.winehq.org/show_bug.cgi?id=245

           Summary: Builtin msvcrt does not set the environment properly
           Product: Wine
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: CLOSED
          Severity: normal
          Priority: P1
         Component: wine-misc
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: fgouget at codeweavers.com


The bug is in dlls/msvcrt/data.c:msvcrt_init_args:

  /* FIXME: This is plain wrong, we must convert from a '\0' separated 
   * memory block to an array of pointers to string format.
   */
  MSVCRT__environ = GetEnvironmentStringsA();
  MSVCRT___initenv = MSVCRT__environ;
  /* FIXME: This is plain wrong, we must convert from a '\0' separated 
   * memory block to an array of pointers to string format.
   */
  MSVCRT__wenviron = GetEnvironmentStringsW();
  MSVCRT___winitenv = MSVCRT__wenviron;

   The comment says it all... almost. The above code should also call
FreeEnvironmentStrings otherwise we have a memory leak.

------- Additional Comments From fgouget at codeweavers.com  2001-03-06 12:51 -------
Eric Pouech fixed this. See 'Re: warning fixes' in wine-patches.


------- Additional Comments From fgouget at codeweavers.com  2001-03-06 12:52 -------
Eric's patch is now in Wine.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list