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
0f6dcbbb
Commit
0f6dcbbb
authored
Dec 11, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Jan 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Handle memory allocation failure in parse_dde_command (cppcheck).
parent
7ebb621e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
dde.c
dlls/shell32/dde.c
+6
-4
No files found.
dlls/shell32/dde.c
View file @
0f6dcbbb
...
...
@@ -347,7 +347,7 @@ static DWORD PROGMAN_OnExecute(WCHAR *command, int argc, WCHAR **argv)
static
DWORD
parse_dde_command
(
HSZ
hszTopic
,
WCHAR
*
command
)
{
WCHAR
*
original
=
command
;
WCHAR
*
opcode
=
NULL
,
**
argv
=
NULL
,
*
p
;
WCHAR
*
opcode
=
NULL
,
**
argv
=
NULL
,
*
*
new_argv
,
*
p
;
int
argc
=
0
,
i
;
DWORD
ret
=
DDE_FACK
;
...
...
@@ -357,7 +357,7 @@ static DWORD parse_dde_command(HSZ hszTopic, WCHAR *command)
while
(
*
command
==
'['
)
{
argc
=
0
;
argv
=
malloc
(
sizeof
(
*
argv
))
;
argv
=
NULL
;
command
++
;
while
(
*
command
==
' '
)
command
++
;
...
...
@@ -385,9 +385,11 @@ static DWORD parse_dde_command(HSZ hszTopic, WCHAR *command)
while
(
p
[
-
1
]
==
' '
)
p
--
;
}
new_argv
=
realloc
(
argv
,
(
argc
+
1
)
*
sizeof
(
*
argv
));
if
(
!
new_argv
)
goto
error
;
argv
=
new_argv
;
argv
[
argc
]
=
strndupW
(
command
,
p
-
command
);
argc
++
;
argv
=
realloc
(
argv
,
argc
*
sizeof
(
*
argv
));
argv
[
argc
-
1
]
=
strndupW
(
command
,
p
-
command
);
command
=
p
;
if
(
*
command
==
'"'
)
command
++
;
...
...
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