[Bug 5728] New: msvcrt:bug in _execl (game arsenal crashes because of this)

Wine Bugs wine-bugs at winehq.org
Fri Jul 21 09:47:34 CDT 2006


http://bugs.winehq.org/show_bug.cgi?id=5728

           Summary: msvcrt:bug in _execl (game arsenal crashes because of
                    this)
           Product: Wine
           Version: CVS
          Platform: PC
               URL: ftp://ftp.avault.com/demos/arsenal.zip
        OS/Version: Linux
            Status: NEW
          Keywords: download
          Severity: normal
          Priority: P2
         Component: wine-binary
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: xerox_xerox2000 at yahoo.co.uk


Hi, the game above crashes because of a bug in execl. a simple test shows this:

#include <stdlib.h>

int main()
{
_execl("c:\\windows\\winhelp.exe",NULL);
}


a simple fix would be

--- a/dlls/msvcrt/process.c
+++ b/dlls/msvcrt/process.c
@@ -224,15 +224,16 @@ MSVCRT_intptr_t CDECL _execl(const char*
   va_list ap;
   char * args;
   MSVCRT_intptr_t ret;
-
+  if(arg0){
   va_start(ap, arg0);
   args = msvcrt_valisttos(arg0, ap, ' ');
-  va_end(ap);
+  va_end(ap);}

   ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, NULL);
   MSVCRT_free(args);

   return ret;
+
 }


However, i do not know enough of this stuff to know if this would be a proper
fix. Anyone could comment?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list