mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:PNP] Reduce the default buffer size in EnumerateDevices. CORE-15882
This commit is contained in:
parent
b8e091a44c
commit
2d419e90f9
1 changed files with 2 additions and 1 deletions
|
@ -461,7 +461,8 @@ EnumerateDevices(
|
|||
DeviceExtension = (PPNPROOT_FDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
KeAcquireGuardedMutex(&DeviceExtension->DeviceListLock);
|
||||
|
||||
KeyInfoSize = sizeof(KEY_BASIC_INFORMATION) + (MAX_PATH + 1) * sizeof(WCHAR);
|
||||
/* Should hold most key names, but we reallocate below if it's too small */
|
||||
KeyInfoSize = FIELD_OFFSET(KEY_BASIC_INFORMATION, Name) + 64 * sizeof(WCHAR);
|
||||
KeyInfo = ExAllocatePoolWithTag(PagedPool,
|
||||
KeyInfoSize + sizeof(UNICODE_NULL),
|
||||
TAG_PNP_ROOT);
|
||||
|
|
Loading…
Reference in a new issue