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:
Hervé Poussineau 2005-04-28 21:56:36 +00:00
parent cadb55139f
commit 1e92d6dfb5

View file

@ -71,14 +71,16 @@ ReadBytes(
PIRP Irp;
IO_STATUS_BLOCK ioStatus;
KEVENT event;
LARGE_INTEGER zero;
NTSTATUS Status;
KeInitializeEvent(&event, NotificationEvent, FALSE);
zero.QuadPart = 0;
Irp = IoBuildSynchronousFsdRequest(
IRP_MJ_READ,
LowerDevice,
Buffer, BufferSize,
0,
&zero,
&event,
&ioStatus);
if (!Irp)
@ -422,6 +424,10 @@ SerenumDetectLegacyDevice(
UNICODE_STRING CompatibleIds;
NTSTATUS Status;
DPRINT("Serenum: SerenumDetectLegacyDevice(DeviceObject %p, LowerDevice %p)\n",
DeviceObject,
LowerDevice);
RtlZeroMemory(Buffer, sizeof(Buffer));
/* Reset UART */