[NTOSKRNL] Don't oversize buffer for backtracking in FsRtlIsNameInExpressionPrivate

CORE-15902
This commit is contained in:
Bartosz Brachaczek 2019-03-31 11:15:38 +02:00 committed by Pierre Schweitzer
parent 180d7169e6
commit b1ae592e7f
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -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,