Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8b2910fd
Commit
8b2910fd
authored
Jul 29, 2004
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Check the range for HIDIOC?USAGES num_values.
Signed-off-by:
Vojtech Pavlik
<
vojtech@suse.cz
>
parent
664bc086
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+4
-7
No files found.
drivers/usb/input/hiddev.c
View file @
8b2910fd
...
@@ -633,14 +633,11 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
...
@@ -633,14 +633,11 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
}
else
if
(
uref
->
usage_index
>=
field
->
report_count
)
}
else
if
(
uref
->
usage_index
>=
field
->
report_count
)
goto
inval
;
goto
inval
;
else
if
((
cmd
==
HIDIOCGUSAGES
||
else
if
((
cmd
==
HIDIOCGUSAGES
||
cmd
==
HIDIOCSUSAGES
)
&&
cmd
==
HIDIOCSUSAGES
)
&&
(
uref_multi
->
num_values
>=
HID_MAX_MULTI_USAGES
||
(
uref
->
usage_index
+
uref_multi
->
num_values
>=
uref
->
usage_index
+
uref_multi
->
num_values
>=
field
->
report_count
||
field
->
report_count
||
uref
->
usage_index
+
uref_multi
->
num_values
<
uref
->
usage_index
))
uref
->
usage_index
+
uref_multi
->
num_values
<
uref
->
usage_index
))
goto
inval
;
goto
inval
;
}
}
switch
(
cmd
)
{
switch
(
cmd
)
{
...
...
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