Ignore:
Timestamp:
Dec 17, 2002, 2:48:24 PM (23 years ago)
Author:
sandervl
Message:

CreateProcess bugfix (heap corruption)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r9497 r9517  
    1 /* $Id: wprocess.cpp,v 1.165 2002-12-13 16:54:17 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.166 2002-12-17 13:48:24 sandervl Exp $ */
    22
    33/*
     
    20082008            char *newcmdline;
    20092009
    2010             newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + iNewCommandLineLength + 32);
     2010            newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + iNewCommandLineLength + strlen(lpszPE) + 16);
    20112011            sprintf(newcmdline, "%s /OPT:[CURDIR=%s] %s %s", lpszPE, lpCurrentDirectory, szAppName, lpCommandLine);
    20122012            free(cmdline);
     
    20162016            char *newcmdline;
    20172017
    2018             newcmdline = (char *)malloc(iNewCommandLineLength + 16);
     2018            newcmdline = (char *)malloc(iNewCommandLineLength + strlen(lpszPE) + 16);
    20192019            sprintf(newcmdline, "%s %s %s", lpszPE, szAppName, lpCommandLine);
    20202020            free(cmdline);
     
    20352035        char *newcmdline;
    20362036
    2037         newcmdline = (char *)malloc(strlen(szAppName) + strlen(cmdline) + 512);
     2037        newcmdline = (char *)malloc(strlen(szAppName) + strlen(cmdline) + strlen(szNELoader) + strlen(szPEGUILoader) + strlen(lpCommandLine) + 32);
    20382038
    20392039        sprintf(newcmdline, "%s /PELDR=[%s] %s", szNELoader, szPEGUILoader, szAppName, lpCommandLine);
Note: See TracChangeset for help on using the changeset viewer.