[Bug 44531] New: wine_get_host_version corrupts stack
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(a)winehq.org Reporter: nikolaysemenkov(a)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.
https://bugs.winehq.org/show_bug.cgi?id=44531 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> --- buf is static so it's not on the stack and doesn't go out of scope. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=44531 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED CC| |nerv(a)dawncrow.de --- Comment #2 from André H. <nerv(a)dawncrow.de> --- closing invalid -- 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.
participants (1)
-
wine-bugs@winehq.org