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
98c512e0
Commit
98c512e0
authored
Aug 06, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Pass sizeof(packet) as input for IOCTL_HID_SET_OUTPUT_REPORT.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ada3ec64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
device.c
dlls/hidclass.sys/device.c
+10
-1
driver_hid.c
dlls/ntoskrnl.exe/tests/driver_hid.c
+2
-2
No files found.
dlls/hidclass.sys/device.c
View file @
98c512e0
...
...
@@ -356,7 +356,16 @@ static void hid_device_xfer_report( BASE_DEVICE_EXTENSION *ext, ULONG code, IRP
packet
.
reportBufferLen
--
;
}
call_minidriver
(
code
,
ext
->
u
.
pdo
.
parent_fdo
,
NULL
,
0
,
&
packet
,
sizeof
(
packet
),
&
irp
->
IoStatus
);
switch
(
code
)
{
case
IOCTL_HID_GET_FEATURE
:
case
IOCTL_HID_GET_INPUT_REPORT
:
call_minidriver
(
code
,
ext
->
u
.
pdo
.
parent_fdo
,
NULL
,
0
,
&
packet
,
sizeof
(
packet
),
&
irp
->
IoStatus
);
break
;
case
IOCTL_HID_SET_OUTPUT_REPORT
:
call_minidriver
(
code
,
ext
->
u
.
pdo
.
parent_fdo
,
NULL
,
sizeof
(
packet
),
&
packet
,
0
,
&
irp
->
IoStatus
);
break
;
}
}
static
void
HID_set_to_device
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
...
...
dlls/ntoskrnl.exe/tests/driver_hid.c
View file @
98c512e0
...
...
@@ -549,8 +549,8 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
{
HID_XFER_PACKET
*
packet
=
irp
->
UserBuffer
;
ULONG
expected_size
=
2
;
todo_wine
ok
(
in_size
==
sizeof
(
*
packet
),
"got input size %u
\n
"
,
in_size
);
todo_wine
ok
(
!
out_size
,
"got output size %u
\n
"
,
out_size
);
ok
(
in_size
==
sizeof
(
*
packet
),
"got input size %u
\n
"
,
in_size
);
ok
(
!
out_size
,
"got output size %u
\n
"
,
out_size
);
todo_wine_if
(
packet
->
reportId
==
0x5a
)
ok
(
packet
->
reportId
==
report_id
,
"got id %u
\n
"
,
packet
->
reportId
);
...
...
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