Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9c5ab964
Commit
9c5ab964
authored
Aug 03, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Return STATUS_INVALID_USER_BUFFER when appropriate.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f4ccd04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
device.c
dlls/hidclass.sys/device.c
+6
-1
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+1
-1
No files found.
dlls/hidclass.sys/device.c
View file @
9c5ab964
...
...
@@ -499,7 +499,12 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
BYTE
*
buffer
=
MmGetSystemAddressForMdlSafe
(
irp
->
MdlAddress
,
NormalPagePriority
);
ULONG
out_length
;
if
(
!
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
||
!
buffer
)
if
(
!
buffer
)
{
irp
->
IoStatus
.
Status
=
STATUS_INVALID_USER_BUFFER
;
break
;
}
if
(
!
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
)
{
irp
->
IoStatus
.
Status
=
STATUS_BUFFER_TOO_SMALL
;
break
;
...
...
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
9c5ab964
...
...
@@ -2441,7 +2441,7 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetInputReport
(
file
,
report
,
0
);
ok
(
!
ret
,
"HidD_GetInputReport succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_USER_BUFFER
,
"HidD_GetInputReport returned error %u
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_USER_BUFFER
,
"HidD_GetInputReport returned error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetInputReport
(
file
,
report
,
caps
.
InputReportByteLength
-
1
);
...
...
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