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
42ecb0ec
Commit
42ecb0ec
authored
Apr 30, 2021
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Apr 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Test what Shell_MergeMenus() does with a negative adjustment.
Signed-off-by:
Damjan Jovanovic
<
damjan.jov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
91a8b481
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
shlfileop.c
dlls/shell32/tests/shlfileop.c
+11
-0
No files found.
dlls/shell32/tests/shlfileop.c
View file @
42ecb0ec
...
...
@@ -2673,6 +2673,7 @@ test_shlmenu(void) {
src_menu
=
CreatePopupMenu
();
ok
(
src_menu
!=
NULL
,
"CreatePopupMenu() failed, error %d
\n
"
,
GetLastError
());
dst_menu
=
CreatePopupMenu
();
ok
(
dst_menu
!=
NULL
,
"CreatePopupMenu() failed, error %d
\n
"
,
GetLastError
());
bres
=
InsertMenuA
(
src_menu
,
-
1
,
MF_BYPOSITION
|
MF_STRING
,
10
,
"item1"
);
...
...
@@ -2690,6 +2691,16 @@ test_shlmenu(void) {
ok
(
bres
,
"GetMenuItemInfoA failed, error %d
\n
"
,
GetLastError
());
ok
(
item_info
.
wID
==
133
,
"got %d
\n
"
,
item_info
.
wID
);
DestroyMenu
(
dst_menu
);
/* integer overflow: Shell_MergeMenus() return value is wrong, but items are still added */
dst_menu
=
CreatePopupMenu
();
ok
(
dst_menu
!=
NULL
,
"CreatePopupMenu() failed, error %d
\n
"
,
GetLastError
());
hres
=
Shell_MergeMenus
(
dst_menu
,
src_menu
,
0
,
-
1
,
133
,
MM_SUBMENUSHAVEIDS
);
ok
(
hres
==
-
1
,
"got %d
\n
"
,
hres
);
count
=
GetMenuItemCount
(
dst_menu
);
ok
(
count
==
2
,
"got %d
\n
"
,
count
);
DestroyMenu
(
dst_menu
);
DestroyMenu
(
src_menu
);
}
...
...
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