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