shell32 patch 23g
Martin Fuchs
martin-fuchs at gmx.net
Sat Apr 3 03:49:15 CST 2004
Changelog:
optimization: null terminate string buffers instead of filling them completely with 0
Index: shlexec.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlexec.c,v
retrieving revision 1.38
diff -u -p -d -r1.38 shlexec.c
--- shlexec.c 1 Apr 2004 21:00:23 -0000 1.38
+++ shlexec.c 3 Apr 2004 09:47:55 -0000
@@ -418,10 +418,11 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
WCHAR wBuffer[256]; /* Used to GetProfileString */
UINT retval = 31; /* default - 'No association was found' */
WCHAR *tok; /* token pointer */
- WCHAR xlpFile[256] = {0}; /* result of SearchPath */
+ WCHAR xlpFile[256]; /* result of SearchPath */
TRACE("%s\n", (lpFile != NULL) ? debugstr_w(lpFile) : "-");
+ xlpFile[0] = '\0';
lpResult[0] = '\0'; /* Start off with an empty return string */
if (key) *key = '\0';
@@ -708,18 +709,22 @@ static UINT execute_from_key(LPWSTR key,
SHELL_ExecuteW32 execfunc,
LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
{
- WCHAR cmd[1024] = {0};
+ WCHAR cmd[1024];
LONG cmdlen = sizeof(cmd);
UINT retval = 31;
+ cmd[0] = '\0';
+
/* Get the application for the registry */
if (RegQueryValueW(HKEY_CLASSES_ROOT, key, cmd, &cmdlen) == ERROR_SUCCESS)
{
static const WCHAR wCommand[] = {'c','o','m','m','a','n','d',0};
static const WCHAR wDdeexec[] = {'d','d','e','e','x','e','c',0};
LPWSTR tmp;
- WCHAR param[256] = {0};
+ WCHAR param[256];
LONG paramlen = sizeof(param);
+
+ param[0] = '\0';
/* Get the parameters needed by the application
from the associated ddeexec key */
More information about the wine-patches
mailing list