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
8db5dec9
Commit
8db5dec9
authored
Jan 14, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass: Only access Tail.Overlay.OriginalFileObject when needed.
parent
67710795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
device.c
dlls/hidclass.sys/device.c
+4
-1
No files found.
dlls/hidclass.sys/device.c
View file @
8db5dec9
...
...
@@ -527,7 +527,6 @@ static NTSTATUS hid_device_xfer_report( BASE_DEVICE_EXTENSION *ext, ULONG code,
NTSTATUS
WINAPI
pdo_ioctl
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
struct
hid_queue
*
queue
=
irp
->
Tail
.
Overlay
.
OriginalFileObject
->
FsContext
;
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
BASE_DEVICE_EXTENSION
*
ext
=
device
->
DeviceExtension
;
NTSTATUS
status
=
irp
->
IoStatus
.
Status
;
...
...
@@ -637,7 +636,10 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
!=
sizeof
(
ULONG
))
status
=
STATUS_BUFFER_OVERFLOW
;
else
{
struct
hid_queue
*
queue
=
irp
->
Tail
.
Overlay
.
OriginalFileObject
->
FsContext
;
status
=
hid_queue_resize
(
queue
,
*
(
ULONG
*
)
irp
->
AssociatedIrp
.
SystemBuffer
);
}
break
;
}
case
IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS
:
...
...
@@ -646,6 +648,7 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
status
=
STATUS_BUFFER_TOO_SMALL
;
else
{
struct
hid_queue
*
queue
=
irp
->
Tail
.
Overlay
.
OriginalFileObject
->
FsContext
;
*
(
ULONG
*
)
irp
->
AssociatedIrp
.
SystemBuffer
=
queue
->
length
;
irp
->
IoStatus
.
Information
=
sizeof
(
ULONG
);
status
=
STATUS_SUCCESS
;
...
...
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