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;