From a5f12908df6245ab254d4152399058e385137516 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Thu, 5 Apr 2018 22:06:31 +0200 Subject: [PATCH] [NTOSKRNL] Fix IopValidateID using uninitialized var, reset SeparatorsCount in the MultiSz case. --- ntoskrnl/io/pnpmgr/pnpmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c index dd75f7f947d..da3cf8c0658 100644 --- a/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1793,6 +1793,7 @@ IopValidateID( case BusQueryHardwareIDs: case BusQueryCompatibleIDs: + MaxSeparators = MAX_SEPARATORS_DEVICEID; IsMultiSz = TRUE; break; @@ -1823,6 +1824,7 @@ IopValidateID( StringEnd = PtrChar + MAX_DEVICE_ID_LEN + 1; PtrPrevChar = PtrChar; + SeparatorsCount = 0; } else if (Char < ' ' || Char > 0x7F || Char == ',') {