https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b1ae592e7fc781db39f23…
commit b1ae592e7fc781db39f23a9532f535183b55c013
Author: Bartosz Brachaczek <b.brachaczek(a)gmail.com>
AuthorDate: Sun Mar 31 11:15:38 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Mar 31 11:44:00 2019 +0200
[NTOSKRNL] Don't oversize buffer for backtracking in
FsRtlIsNameInExpressionPrivate
CORE-15902
---
ntoskrnl/fsrtl/name.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntoskrnl/fsrtl/name.c b/ntoskrnl/fsrtl/name.c
index fef798cc86..a6f0c004b7 100644
--- a/ntoskrnl/fsrtl/name.c
+++ b/ntoskrnl/fsrtl/name.c
@@ -143,7 +143,7 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
ASSERT((OldBackTracking == BackTrackingBuffer) || (OldBackTracking ==
OldBackTrackingBuffer));
/* Calculate buffer size */
- BackTrackingBufferSize = (Expression->Length + 1) * 2;
+ BackTrackingBufferSize = Expression->Length + 1;
/* Allocate memory for both back-tracking buffers */
AllocatedBuffer = ExAllocatePoolWithTag(PagedPool |
POOL_RAISE_IF_ALLOCATION_FAILURE,