https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3a280f52bd9f607d314c…
commit f3a280f52bd9f607d314c8d812826dc40b12e3cd
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Mon Apr 15 08:25:23 2019 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun May 5 10:39:11 2019 +0200
[NTOS] Use correct buffer size when calling MiResolveImageReferences. CORE-15882
---
ntoskrnl/io/iomgr/driver.c | 4 +++-
ntoskrnl/mm/ARM3/sysldr.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c
index 49422e003a..f636dc3562 100644
--- a/ntoskrnl/io/iomgr/driver.c
+++ b/ntoskrnl/io/iomgr/driver.c
@@ -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 */
diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c
index 4c2ffdaeb3..640856620a 100644
--- a/ntoskrnl/mm/ARM3/sysldr.c
+++ b/ntoskrnl/mm/ARM3/sysldr.c
@@ -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 */