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
482354bd
Commit
482354bd
authored
Dec 01, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Dec 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Check for NULL lpText (Coverity).
parent
8dd5c04c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
shlmenu.c
dlls/shell32/shlmenu.c
+4
-1
No files found.
dlls/shell32/shlmenu.c
View file @
482354bd
...
@@ -392,12 +392,15 @@ BOOL WINAPI FileMenu_AppendItemAW(
...
@@ -392,12 +392,15 @@ BOOL WINAPI FileMenu_AppendItemAW(
{
{
BOOL
ret
;
BOOL
ret
;
if
((
SHELL_OsIsUnicode
()
&&
(
lpText
!=
FM_SEPARATOR
))
||
(
lpText
==
NULL
))
if
(
!
lpText
)
return
FALSE
;
if
(
SHELL_OsIsUnicode
()
||
lpText
==
FM_SEPARATOR
)
ret
=
FileMenu_AppendItemW
(
hMenu
,
lpText
,
uID
,
icon
,
hMenuPopup
,
nItemHeight
);
ret
=
FileMenu_AppendItemW
(
hMenu
,
lpText
,
uID
,
icon
,
hMenuPopup
,
nItemHeight
);
else
else
{
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpText
,
-
1
,
NULL
,
0
);
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpText
,
-
1
,
NULL
,
0
);
LPWSTR
lpszText
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
LPWSTR
lpszText
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
lpszText
)
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpText
,
-
1
,
lpszText
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpText
,
-
1
,
lpszText
,
len
);
ret
=
FileMenu_AppendItemW
(
hMenu
,
lpszText
,
uID
,
icon
,
hMenuPopup
,
nItemHeight
);
ret
=
FileMenu_AppendItemW
(
hMenu
,
lpszText
,
uID
,
icon
,
hMenuPopup
,
nItemHeight
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszText
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszText
);
...
...
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