Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3abf44f1
Commit
3abf44f1
authored
Apr 05, 2004
by
Martin Fuchs
Committed by
Alexandre Julliard
Apr 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimization: null terminate string buffers instead of filling them
completely with 0.
parent
d98c36c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
shlexec.c
dlls/shell32/shlexec.c
+8
-3
No files found.
dlls/shell32/shlexec.c
View file @
3abf44f1
...
...
@@ -418,10 +418,11 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
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,19 +709,23 @@ static UINT execute_from_key(LPWSTR key, LPCWSTR lpFile, void *env, LPCWSTR szCo
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 */
tmp
=
strstrW
(
key
,
wCommand
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment