Commit f5bd9463 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

kernelbase: Don't set the output size in DeviceIoControl() if the NT status denotes error.

parent cc7e3ec8
......@@ -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) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment