[NTOS:IO] Fix pool memory disclosure in IopQueueTargetDeviceEvent (#2966)
[reactos.git] / ntoskrnl / io / pnpmgr / plugplay.c
index c1d5baa..96bac11 100644 (file)
@@ -64,6 +64,7 @@ IopQueueTargetDeviceEvent(const GUID *Guid,
                                 TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
     if (!EventEntry)
         return STATUS_INSUFFICIENT_RESOURCES;
+    RtlZeroMemory(EventEntry, TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
 
     /* Fill the buffer with the event GUID */
     RtlCopyMemory(&EventEntry->Event.EventGuid,