http://bugs.winehq.org/show_bug.cgi?id=22138
Summary: system(NULL) generates SIGSEGV Product: Wine Version: 1.1.41 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: carlo.bramix@libero.it
When an application calls system(NULL) or _wsystem(NULL), a SIGSEGV is generated. Actually the code of _wsystem() does not check the value of cmd parameter as described here:
Perhaps a better implementation would be something like to:
comspec = msvcrt_get_comspec(); if (cmd == NULL) return (comspec == NULL) ? 0 : 1; else if (comspec == NULL) return -1;
http://bugs.winehq.org/show_bug.cgi?id=22138
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-23 08:09:26 --- Please write a test case, and possibly create a patch as well. Send them to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=22138
--- Comment #2 from Carlo Bramini carlo.bramix@libero.it 2010-03-25 07:37:54 --- Unfortunately I cannot do it myself because I do not use Linux+WINE. I'm using Windows 98 at home. This bug has been found when trying to crosscompile GUILE on Linux for Mingw. All I can do is reporting the defect, I hope someone else could do it in the future.
http://bugs.winehq.org/show_bug.cgi?id=22138
Robert Wilhelm bugzilla.rw@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla.rw@googlemail.com
--- Comment #3 from Robert Wilhelm bugzilla.rw@googlemail.com 2010-05-28 11:21:02 --- This is fixed now in wine-git.
http://bugs.winehq.org/show_bug.cgi?id=22138
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Andrew Nguyen arethusa26@gmail.com 2010-05-28 11:34:00 --- Indeed, fixed by 620af69d888bc5d0fa2179f06423aa1fb290b11b.
http://bugs.winehq.org/show_bug.cgi?id=22138
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2010-05-28 12:51:27 --- Closing bugs fixed in 1.2-rc2.