https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a5f12908df6245ab254d4…
commit a5f12908df6245ab254d4152399058e385137516
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Apr 5 22:06:31 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Apr 5 22:06:31 2018 +0200
[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 dd75f7f947..da3cf8c065 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 == ',')
{