mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Don't corrupt the registry when deleting a REG_DWORD value
svn path=/trunk/; revision=11217
This commit is contained in:
parent
5be7877f22
commit
1541b702fa
1 changed files with 4 additions and 2 deletions
|
@ -2626,7 +2626,8 @@ CmiRemoveSubKey(PREGISTRY_HIVE RegistryHive,
|
|||
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 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive,
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue