[MOUNTMGR]

- Avoid an unnecessarily large stack buffer in MountMgrMountedDeviceArrival
- Add missing OBJ_KERNEL_HANDLE. CORE-10207

svn path=/trunk/; revision=71140
This commit is contained in:
Thomas Faber 2016-04-10 17:51:47 +00:00
parent 1b444ed447
commit 83f145b065

View file

@ -958,7 +958,7 @@ MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION DeviceExtension,
PMOUNTDEV_UNIQUE_ID UniqueId, NewUniqueId; PMOUNTDEV_UNIQUE_ID UniqueId, NewUniqueId;
PSAVED_LINK_INFORMATION SavedLinkInformation; PSAVED_LINK_INFORMATION SavedLinkInformation;
PDEVICE_INFORMATION DeviceInformation, CurrentDevice; PDEVICE_INFORMATION DeviceInformation, CurrentDevice;
WCHAR CSymLinkBuffer[MAX_PATH], LinkTargetBuffer[MAX_PATH]; WCHAR CSymLinkBuffer[RTL_NUMBER_OF(Cunc)], LinkTargetBuffer[MAX_PATH];
UNICODE_STRING TargetDeviceName, SuggestedLinkName, DeviceName, VolumeName, DriveLetter, LinkTarget, CSymLink; UNICODE_STRING TargetDeviceName, SuggestedLinkName, DeviceName, VolumeName, DriveLetter, LinkTarget, CSymLink;
BOOLEAN HasGuid, HasGptDriveLetter, Valid, UseOnlyIfThereAreNoOtherLinks, IsDrvLetter, IsOff, IsVolumeName, LinkError; BOOLEAN HasGuid, HasGptDriveLetter, Valid, UseOnlyIfThereAreNoOtherLinks, IsDrvLetter, IsOff, IsVolumeName, LinkError;
@ -1119,7 +1119,7 @@ MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION DeviceExtension,
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&CSymLink, &CSymLink,
OBJ_CASE_INSENSITIVE, OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
NULL, NULL,
NULL); NULL);