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
151694a0
Commit
151694a0
authored
Jan 12, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Handle NULL argument in GetKeyboardLayoutNameW().
parent
ab1eee50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
input.c
dlls/user32/input.c
+5
-0
input.c
dlls/user32/tests/input.c
+8
-0
No files found.
dlls/user32/input.c
View file @
151694a0
...
...
@@ -966,6 +966,11 @@ BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pszKLID)
*/
BOOL
WINAPI
GetKeyboardLayoutNameW
(
LPWSTR
pwszKLID
)
{
if
(
!
pwszKLID
)
{
SetLastError
(
ERROR_NOACCESS
);
return
FALSE
;
}
return
USER_Driver
->
pGetKeyboardLayoutName
(
pwszKLID
);
}
...
...
dlls/user32/tests/input.c
View file @
151694a0
...
...
@@ -1595,6 +1595,14 @@ static void test_keyboard_layout_name(void)
BOOL
ret
;
char
klid
[
KL_NAMELENGTH
];
if
(
0
)
/* crashes on native system */
ret
=
GetKeyboardLayoutNameA
(
NULL
);
SetLastError
(
0xdeadbeef
);
ret
=
GetKeyboardLayoutNameW
(
NULL
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_NOACCESS
,
"got %d
\n
"
,
GetLastError
());
if
(
GetKeyboardLayout
(
0
)
!=
(
HKL
)(
ULONG_PTR
)
0x04090409
)
return
;
klid
[
0
]
=
0
;
...
...
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