[NTOSKRNL] Don't overflow backtrack stack buffer

CORE-15902
This commit is contained in:
Bartosz Brachaczek 2019-03-31 11:27:16 +02:00 committed by Pierre Schweitzer
parent b1ae592e7f
commit 5d5e9c8486
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
2 changed files with 2 additions and 2 deletions

View file

@ -283,7 +283,7 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
}
/* If buffer too small */
if (BackTrackingPosition > BackTrackingBufferSize - 2)
if (BackTrackingPosition > BackTrackingBufferSize - 3)
{
/* We should only ever get here once! */
ASSERT(AllocatedBuffer == NULL);

View file

@ -135,7 +135,7 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
}
/* If buffer too small */
if (BackTrackingPosition > BackTrackingBufferSize - 2)
if (BackTrackingPosition > BackTrackingBufferSize - 3)
{
/* We should only ever get here once! */
ASSERT(AllocatedBuffer == NULL);