Commit in reactos/ntoskrnl/cm on MAIN
regfile.c+4-21.81 -> 1.82
Don't corrupt the registry when deleting a REG_DWORD value

reactos/ntoskrnl/cm
regfile.c 1.81 -> 1.82
diff -u -r1.81 -r1.82
--- regfile.c	25 Sep 2004 20:53:29 -0000	1.81
+++ regfile.c	7 Oct 2004 18:00:10 -0000	1.82
@@ -2626,7 +2626,8 @@
 	      return STATUS_UNSUCCESSFUL;
 	    }
 
-	  if (ValueCell->DataSize > sizeof(BLOCK_OFFSET))
+	  if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET)
+              && ValueCell->DataSize > sizeof(BLOCK_OFFSET))
 	    {
 	      DataCell = CmiGetCell (RegistryHive,
 				     ValueCell->DataOffset,
@@ -3219,7 +3220,8 @@
   VERIFY_VALUE_CELL(ValueCell);
 
   /* Destroy the data cell */
-  if (ValueCell->DataSize > sizeof(BLOCK_OFFSET))
+  if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET)
+      && ValueCell->DataSize > sizeof(BLOCK_OFFSET))
     {
       DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset, &Bin);
       if (DataCell == NULL)
CVSspam 0.2.8