Changeset 3652
- Timestamp:
- Nov 3, 2024, 4:04:15 AM (11 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/misc/win_exec_wrapper.c
r3528 r3652 35 35 DWORD dwIgnored; 36 36 PROCESS_INFORMATION ProcInfo = { NULL, NULL, 0, 0 }; 37 WCHAR wszExec[260]; 38 UINT cwcExec = GetModuleFileNameW(NULL, wszExec, 512); 37 #define MAX_EXEC_SIZE 512 38 WCHAR wszExec[MAX_EXEC_SIZE]; 39 UINT cwcExec = GetModuleFileNameW(NULL, wszExec, MAX_EXEC_SIZE); 39 40 BOOL fExecOk = FALSE; 40 41 WCHAR const * const pwszCommandLine = GetCommandLineW(); … … 53 54 * Construct the executable path. 54 55 */ 55 if (cwcExec > 10)56 if (cwcExec > 3+4) 56 57 { 57 58 /* Strip the filename. */ … … 76 77 while (off < sizeof(s_szTargetName)) 77 78 wszExec[cwcExec++] = s_szTargetName[off++]; 78 fExecOk = cwcExec <= 260;79 fExecOk = cwcExec <= MAX_EXEC_SIZE; 79 80 } 80 81 }
Note:
See TracChangeset
for help on using the changeset viewer.