https://git.reactos.org/?p=reactos.git;a=commitdiff;h=28343c6c0c5ca7a91778f…
commit 28343c6c0c5ca7a91778fcf46f08e1cc6213272c
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Dec 9 12:45:16 2017 +0100
[FASTFAT] Fix size checking in VfatGetFileNameInformation()
---
drivers/filesystems/fastfat/dir.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/filesystems/fastfat/dir.c b/drivers/filesystems/fastfat/dir.c
index 284c04bca1..1e657f19fd 100644
--- a/drivers/filesystems/fastfat/dir.c
+++ b/drivers/filesystems/fastfat/dir.c
@@ -101,17 +101,17 @@ VfatGetFileNameInformation(
*Written = 0;
Status = STATUS_BUFFER_OVERFLOW;
- if (FIELD_OFFSET(FILE_NAMES_INFORMATION, FileName) > BufferLength)
+ if (FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) > BufferLength)
return Status;
- if (First || (BufferLength >= FIELD_OFFSET(FILE_NAMES_INFORMATION, FileName) +
DirContext->LongNameU.Length))
+ if (First || (BufferLength >= FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) +
DirContext->LongNameU.Length))
{
pInfo->FileNameLength = DirContext->LongNameU.Length;
- *Written = FIELD_OFFSET(FILE_NAMES_INFORMATION, FileName);
- if (BufferLength > FIELD_OFFSET(FILE_NAMES_INFORMATION, FileName))
+ *Written = FIELD_OFFSET(FILE_NAME_INFORMATION, FileName);
+ if (BufferLength > FIELD_OFFSET(FILE_NAME_INFORMATION, FileName))
{
- BytesToCopy = min(DirContext->LongNameU.Length, BufferLength -
FIELD_OFFSET(FILE_NAMES_INFORMATION, FileName));
+ BytesToCopy = min(DirContext->LongNameU.Length, BufferLength -
FIELD_OFFSET(FILE_NAME_INFORMATION, FileName));
RtlCopyMemory(pInfo->FileName,
DirContext->LongNameU.Buffer,
BytesToCopy);