* fix registry BSOD when no value exists
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 13 Aug 2006 18:57:28 +0000 (18:57 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 13 Aug 2006 18:57:28 +0000 (18:57 +0000)
* fixes bug 1750
* thnx to P43LOk for bug report

svn path=/trunk/; revision=23568

reactos/ntoskrnl/cm/regfile.c

index 8d83467..fecd3f7 100644 (file)
@@ -1564,6 +1564,11 @@ CmiDeleteValueFromKey(IN PEREGISTRY_HIVE RegistryHive,
   ULONG i;
   NTSTATUS Status;
 
+  if (KeyCell->ValueListOffset == -1)
+    {
+      return STATUS_OBJECT_NAME_NOT_FOUND;
+    }
+
   ValueListCell = HvGetCell (RegistryHive->Hive, KeyCell->ValueListOffset);
 
   VERIFY_VALUE_LIST_CELL(ValueListCell);