[NTOS] Use correct buffer size when calling MiResolveImageReferences. CORE-15882

This commit is contained in:
Thomas Faber 2019-04-15 08:25:23 +02:00
parent ccb91bebbe
commit f3a280f52b
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 6 additions and 2 deletions

View file

@ -735,7 +735,9 @@ LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry,
PVOID DriverBase = LdrEntry->DllBase;
/* Allocate a buffer we'll use for names */
Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, TAG_LDR_WSTR);
Buffer = ExAllocatePoolWithTag(NonPagedPool,
MAXIMUM_FILENAME_LENGTH,
TAG_LDR_WSTR);
if (!Buffer)
{
/* Fail */

View file

@ -2793,7 +2793,9 @@ MmLoadSystemImage(IN PUNICODE_STRING FileName,
}
/* Allocate a buffer we'll use for names */
Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, TAG_LDR_WSTR);
Buffer = ExAllocatePoolWithTag(NonPagedPool,
MAXIMUM_FILENAME_LENGTH,
TAG_LDR_WSTR);
if (!Buffer) return STATUS_INSUFFICIENT_RESOURCES;
/* Check for a separator */