[NTOS:PNP] Reduce the size of the pool buffer in IopGetParentIdPrefix. CORE-15882

This commit is contained in:
Thomas Faber 2019-04-18 07:41:50 +02:00
parent 2f1fab41fa
commit 5706f6e9f4
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -1853,7 +1853,7 @@ IopGetParentIdPrefix(PDEVICE_NODE DeviceNode,
}
/* 1. Try to retrieve ParentIdPrefix from registry */
KeyNameBufferLength = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]) + MAX_PATH * sizeof(WCHAR);
KeyNameBufferLength = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data) + sizeof(L"12345678&12345678");
ParentIdPrefixInformation = ExAllocatePoolWithTag(PagedPool,
KeyNameBufferLength + sizeof(UNICODE_NULL),
TAG_IO);