http://bugs.winehq.org/show_bug.cgi?id=8346
Summary: cmd crashes on malformed statement Product: Wine Version: CVS Platform: Other OS/Version: other Status: NEW Keywords: download Severity: normal Priority: P2 Component: wine-programs AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
The command cmd /c foo.cmd where foo.cmd contains if not defined %x echo yes crashes. (It's not valid cmd syntax, but I did observe this in the wild.) Turns out cmd's WCMD_if is trying to strdup a null string.
=>1 0xf7de42a3 (0x00341048) 2 0x7e58efcd WCMD_if+0xfc(p=0x16c6db) [.../programs/cmd/builtins.c:808] in cmd (0x00341188) 3 0x7e5946f8 WCMD_process_command+0x162d(command=...) [...programs/cmd/wcmdmain.c:641] in cmd (0x00345278)
Wine-dbg>frame 1 808 command = strdup (command);