mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 16:44:10 +00:00
kernelbase: Don't set the output size in DeviceIoControl() if the NT status denotes error.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cc7e3ec8e2
commit
f5bd946399
|
@ -4115,7 +4115,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeviceIoControl( HANDLE handle, DWORD code, void *
|
|||
status = NtDeviceIoControlFile( handle, event, NULL, cvalue, piosb, code,
|
||||
in_buff, in_count, out_buff, out_count );
|
||||
|
||||
if (returned) *returned = piosb->Information;
|
||||
if (returned && !NT_ERROR(status)) *returned = piosb->Information;
|
||||
if (status == STATUS_PENDING || !NT_SUCCESS( status )) return set_ntstatus( status );
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params)
|
|||
ok(GetLastError() == RtlNtStatusToDosError(expect_status), "got error %u\n", GetLastError());
|
||||
}
|
||||
if (NT_ERROR(expect_status))
|
||||
todo_wine ok(size == 0xdeadf00d, "got size %u\n", size);
|
||||
ok(size == 0xdeadf00d, "got size %u\n", size);
|
||||
else if (!NT_ERROR(params->iosb_status))
|
||||
todo_wine_if (params->iosb_status == STATUS_PENDING) ok(size == 3, "got size %u\n", size);
|
||||
/* size is garbage if !NT_ERROR(expect_status) && NT_ERROR(iosb_status) */
|
||||
|
|
Loading…
Reference in a new issue