mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00: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:
parent
5028c3adec
commit
97a23a5f3d
1 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue