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
e58557c6
Commit
e58557c6
authored
Nov 20, 2001
by
Dave Hawkes
Committed by
Alexandre Julliard
Nov 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lock up in GetKeyNameText due to an increment wrap when KeyCode is
a char type and max_keycode is 255.
parent
9cef2d0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
keyboard.c
windows/x11drv/keyboard.c
+5
-3
No files found.
windows/x11drv/keyboard.c
View file @
e58557c6
...
...
@@ -1311,6 +1311,7 @@ INT X11DRV_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT nSize)
{
int
vkey
,
ansi
,
scanCode
;
KeyCode
keyc
;
int
keyi
;
KeySym
keys
;
char
*
name
;
...
...
@@ -1374,11 +1375,12 @@ INT X11DRV_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT nSize)
/* let's do scancode -> keycode -> keysym -> String */
for
(
key
c
=
min_keycode
;
keyc
<=
max_keycode
;
keyc
++
)
if
((
keyc2scan
[
key
c
])
==
scanCode
)
for
(
key
i
=
min_keycode
;
keyi
<=
max_keycode
;
keyi
++
)
if
((
keyc2scan
[
key
i
])
==
scanCode
)
break
;
if
(
key
c
<=
max_keycode
)
if
(
key
i
<=
max_keycode
)
{
keyc
=
(
KeyCode
)
keyi
;
keys
=
TSXKeycodeToKeysym
(
thread_display
(),
keyc
,
0
);
name
=
TSXKeysymToString
(
keys
);
TRACE
(
"found scan=%04x keyc=%04x keysym=%04x string=%s
\n
"
,
...
...
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