Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
8011d4e3
Commit
8011d4e3
authored
Aug 20, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keys: fix signed overflow
parent
4ee185d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
modules/video_output/xcb/keysym.c
modules/video_output/xcb/keysym.c
+8
-7
src/config/keys.c
src/config/keys.c
+0
-4
No files found.
modules/video_output/xcb/keysym.c
View file @
8011d4e3
...
...
@@ -32,18 +32,19 @@ struct keysym
{
char
xname
[
32
];
char
uname
[
64
];
int32_t
xsym
;
int32_t
usym
;
u
int32_t
xsym
;
u
int32_t
usym
;
};
static
int
cmpkey
(
const
void
*
va
,
const
void
*
vb
)
{
const
struct
keysym
*
ka
=
va
,
*
kb
=
vb
;
#if (INT_MAX < 0x7fffffff)
# error Oups!
#endif
return
ka
->
xsym
-
kb
->
xsym
;
if
(
ka
->
xsym
>
kb
->
xsym
)
return
+
1
;
if
(
ka
->
xsym
<
kb
->
xsym
)
return
-
1
;
return
0
;
}
static
void
printkey
(
const
void
*
node
,
const
VISIT
which
,
const
int
depth
)
...
...
@@ -79,7 +80,7 @@ static int parse (FILE *in)
abort
();
int
val
=
sscanf
(
line
,
"#define XK_%31s %"
SCN
i
32
" /*%*cU+%"
SCNx32
" %63[^*]"
,
"#define XK_%31s %"
SCN
u
32
" /*%*cU+%"
SCNx32
" %63[^*]"
,
sym
->
xname
,
&
sym
->
xsym
,
&
sym
->
usym
,
sym
->
uname
);
if
(
val
<
3
)
{
...
...
src/config/keys.c
View file @
8011d4e3
...
...
@@ -386,11 +386,7 @@ static int keycmp (const void *a, const void *b)
{
const
struct
mapping
*
ka
=
a
,
*
kb
=
b
;
#if (INT_MAX >= 0x7fffffff)
return
ka
->
key
-
kb
->
key
;
#else
return
(
ka
->
key
<
kb
->
key
)
?
-
1
:
(
ka
->
key
>
kb
->
key
)
?
+
1
:
0
;
#endif
}
struct
vlc_actions
...
...
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