mirror of
https://github.com/reactos/reactos.git
synced 2024-09-27 21:16:34 +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
|
@ -174,9 +174,10 @@ ScmCopyTree(
|
||||||
return ERROR_NOT_ENOUGH_MEMORY;
|
return ERROR_NOT_ENOUGH_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RegSetValueExW tries to read behind the maximum length, so give it space for that */
|
||||||
lpDataBuffer = HeapAlloc(GetProcessHeap(),
|
lpDataBuffer = HeapAlloc(GetProcessHeap(),
|
||||||
0,
|
HEAP_ZERO_MEMORY,
|
||||||
dwMaxValueLength);
|
dwMaxValueLength + sizeof(WCHAR));
|
||||||
if (lpDataBuffer == NULL)
|
if (lpDataBuffer == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Buffer allocation failed\n");
|
DPRINT1("Buffer allocation failed\n");
|
||||||
|
|
Loading…
Reference in a new issue