mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 03:12:59 +00:00
Don't pass a NULL pointer as offset when creating a IRP_MJ_READ irp.
svn path=/trunk/; revision=14851
This commit is contained in:
parent
cadb55139f
commit
1e92d6dfb5
1 changed files with 7 additions and 1 deletions
|
@ -71,14 +71,16 @@ ReadBytes(
|
||||||
PIRP Irp;
|
PIRP Irp;
|
||||||
IO_STATUS_BLOCK ioStatus;
|
IO_STATUS_BLOCK ioStatus;
|
||||||
KEVENT event;
|
KEVENT event;
|
||||||
|
LARGE_INTEGER zero;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
KeInitializeEvent(&event, NotificationEvent, FALSE);
|
KeInitializeEvent(&event, NotificationEvent, FALSE);
|
||||||
|
zero.QuadPart = 0;
|
||||||
Irp = IoBuildSynchronousFsdRequest(
|
Irp = IoBuildSynchronousFsdRequest(
|
||||||
IRP_MJ_READ,
|
IRP_MJ_READ,
|
||||||
LowerDevice,
|
LowerDevice,
|
||||||
Buffer, BufferSize,
|
Buffer, BufferSize,
|
||||||
0,
|
&zero,
|
||||||
&event,
|
&event,
|
||||||
&ioStatus);
|
&ioStatus);
|
||||||
if (!Irp)
|
if (!Irp)
|
||||||
|
@ -422,6 +424,10 @@ SerenumDetectLegacyDevice(
|
||||||
UNICODE_STRING CompatibleIds;
|
UNICODE_STRING CompatibleIds;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
DPRINT("Serenum: SerenumDetectLegacyDevice(DeviceObject %p, LowerDevice %p)\n",
|
||||||
|
DeviceObject,
|
||||||
|
LowerDevice);
|
||||||
|
|
||||||
RtlZeroMemory(Buffer, sizeof(Buffer));
|
RtlZeroMemory(Buffer, sizeof(Buffer));
|
||||||
|
|
||||||
/* Reset UART */
|
/* Reset UART */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue