mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 00:40:26 +08:00
[SERVICES] Fix booting with DPH enabled
RegSetValueExW tries to read one extra character after the buffer, to see if a REG_SZ is null terminated
This commit is contained in:
@@ -174,9 +174,10 @@ ScmCopyTree(
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
/* RegSetValueExW tries to read behind the maximum length, so give it space for that */
|
||||
lpDataBuffer = HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
dwMaxValueLength);
|
||||
HEAP_ZERO_MEMORY,
|
||||
dwMaxValueLength + sizeof(WCHAR));
|
||||
if (lpDataBuffer == NULL)
|
||||
{
|
||||
DPRINT1("Buffer allocation failed\n");
|
||||
|
||||
Reference in New Issue
Block a user