Ignore:
Timestamp:
Sep 30, 2010, 9:35:34 PM (15 years ago)
Author:
dmik
Message:

Fixed: argv[argc] must be NULL.

File:
1 edited

Legend:

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

    r21464 r21469  
    16991699                // Note: intentional memory leak, pszCmdLineW will not be freed
    17001700                // or allocated after process startup
    1701                 cb = sizeof(char*) * __argcA + cch + __argcA;
     1701                cb = sizeof(char*) * (__argcA + 1) + cch + __argcA;
    17021702                __argvA = (char **)malloc(cb);
    17031703                if (__argvA != NULL)
     
    17201720                        cb -= cch;
    17211721                    }
     1722                    // argv[argc] must be NULL
     1723                    __argvA[i] = NULL;
    17221724                }
    17231725                else
Note: See TracChangeset for help on using the changeset viewer.