[MOUNTMGR] Fix out of bounds write

CORE-16530
This commit is contained in:
Mark Jansen 2019-11-23 16:23:28 +01:00
parent 9e797f0ae7
commit d4a0549eb6
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -42,6 +42,7 @@ KEVENT UnloadEvent;
LONG Unloading;
static const WCHAR Cunc[] = L"\\??\\C:";
#define Cunc_LETTER_POSITION 4
/*
* @implemented
@ -1106,7 +1107,7 @@ MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION DeviceExtension,
/* Start checking all letters that could have been associated */
for (Letter = L'D'; Letter <= L'Z'; Letter++)
{
CSymLink.Buffer[LETTER_POSITION] = Letter;
CSymLink.Buffer[Cunc_LETTER_POSITION] = Letter;
InitializeObjectAttributes(&ObjectAttributes,
&CSymLink,