[Bug 44531] New: wine_get_host_version corrupts stack

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Feb 15 20:20:01 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=44531

            Bug ID: 44531
           Summary: wine_get_host_version corrupts stack
           Product: Wine
           Version: 3.0
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ntdll
          Assignee: wine-bugs at winehq.org
          Reporter: nikolaysemenkov at gmail.com
      Distribution: ---

Ubuntu 17.10
Once wine_get_host_version is called, the pointers it returns goes out of
scope, hence corrupt stack.

ie the object which goes out of scope is buf;
and its pointers: buf.sysname


Wine Code:
/*********************************************************************
 *                  wine_get_host_version   (NTDLL.@)
 */
void CDECL NTDLL_wine_get_host_version( const char **sysname, const char
**release )
{
#ifdef HAVE_SYS_UTSNAME_H
    static struct utsname buf;
    static BOOL init_done;

    if (!init_done)
    {
        uname( &buf );
        init_done = TRUE;
    }
    if (sysname) *sysname = buf.sysname;
    if (release) *release = buf.release;
#else
    if (sysname) *sysname = "";
    if (release) *release = "";
#endif
}

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list