From 1e92d6dfb53d74c31805aaa536816464d3756e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 28 Apr 2005 21:56:36 +0000 Subject: [PATCH] Don't pass a NULL pointer as offset when creating a IRP_MJ_READ irp. svn path=/trunk/; revision=14851 --- reactos/drivers/bus/serenum/detect.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/bus/serenum/detect.c b/reactos/drivers/bus/serenum/detect.c index db4d8bf9d47..6a315af6bfe 100644 --- a/reactos/drivers/bus/serenum/detect.c +++ b/reactos/drivers/bus/serenum/detect.c @@ -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 */