[NTOSKRNL] Fix IopValidateID using uninitialized var, reset SeparatorsCount in the...
authorMark Jansen <mark.jansen@reactos.org>
Thu, 5 Apr 2018 20:06:31 +0000 (22:06 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Thu, 5 Apr 2018 20:06:31 +0000 (22:06 +0200)
ntoskrnl/io/pnpmgr/pnpmgr.c

index dd75f7f..da3cf8c 100644 (file)
@@ -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 == ',')
         {