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
54aa6179
Commit
54aa6179
authored
Jan 09, 2010
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Handle bad menu handle (Coverity).
parent
9bcb143a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
shlmenu.c
dlls/shell32/shlmenu.c
+3
-2
shlfileop.c
dlls/shell32/tests/shlfileop.c
+13
-0
No files found.
dlls/shell32/shlmenu.c
View file @
54aa6179
...
...
@@ -869,10 +869,11 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
hmDst
,
hmSrc
,
uInsert
,
uIDAdjust
,
uIDAdjustMax
,
uFlags
);
if
(
!
hmDst
||
!
hmSrc
)
{
return
uIDMax
;
}
return
uIDMax
;
nItem
=
GetMenuItemCount
(
hmDst
);
if
(
nItem
==
-
1
)
return
uIDMax
;
if
(
uInsert
>=
(
UINT
)
nItem
)
/* insert position inside menu? */
{
...
...
dlls/shell32/tests/shlfileop.c
View file @
54aa6179
...
...
@@ -2224,6 +2224,17 @@ static void test_unicode(void)
ok
(
!
file_existsW
(
UNICODE_PATH
),
"The directory should have been removed
\n
"
);
}
extern
HRESULT
WINAPI
Shell_MergeMenus
(
HMENU
hmDst
,
HMENU
hmSrc
,
UINT
uInsert
,
UINT
uIDAdjust
,
UINT
uIDAdjustMax
,
ULONG
uFlags
);
static
void
test_shlmenu
(
void
)
{
HRESULT
hres
;
hres
=
Shell_MergeMenus
(
0
,
0
,
0x42
,
0x4242
,
0x424242
,
0
);
ok
(
hres
==
0x4242
,
"expected 0x4242 but got %x
\n
"
,
hres
);
hres
=
Shell_MergeMenus
((
HMENU
)
42
,
0
,
0x42
,
0x4242
,
0x424242
,
0
);
ok
(
hres
==
0x4242
,
"expected 0x4242 but got %x
\n
"
,
hres
);
}
START_TEST
(
shlfileop
)
{
InitFunctionPointers
();
...
...
@@ -2263,4 +2274,6 @@ START_TEST(shlfileop)
clean_after_shfo_tests
();
test_unicode
();
test_shlmenu
();
}
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