projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9f3c801
)
[FASTFAT] Fix size checking in VfatGetFileNameInformation()
author
Pierre Schweitzer
<pierre@reactos.org>
Sat, 9 Dec 2017 11:45:16 +0000
(12:45 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sat, 9 Dec 2017 11:45:16 +0000
(12:45 +0100)
drivers/filesystems/fastfat/dir.c
patch
|
blob
|
history
diff --git
a/drivers/filesystems/fastfat/dir.c
b/drivers/filesystems/fastfat/dir.c
index
284c04b
..
1e657f1
100644
(file)
--- a/
drivers/filesystems/fastfat/dir.c
+++ b/
drivers/filesystems/fastfat/dir.c
@@
-101,17
+101,17
@@
VfatGetFileNameInformation(
*Written = 0;
Status = STATUS_BUFFER_OVERFLOW;
*Written = 0;
Status = STATUS_BUFFER_OVERFLOW;
- if (FIELD_OFFSET(FILE_NAME
S
_INFORMATION, FileName) > BufferLength)
+ if (FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) > BufferLength)
return Status;
return Status;
- if (First || (BufferLength >= FIELD_OFFSET(FILE_NAME
S
_INFORMATION, FileName) + DirContext->LongNameU.Length))
+ if (First || (BufferLength >= FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + DirContext->LongNameU.Length))
{
pInfo->FileNameLength = DirContext->LongNameU.Length;
{
pInfo->FileNameLength = DirContext->LongNameU.Length;
- *Written = FIELD_OFFSET(FILE_NAME
S
_INFORMATION, FileName);
- if (BufferLength > FIELD_OFFSET(FILE_NAME
S
_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_NAME
S
_INFORMATION, FileName));
+ BytesToCopy = min(DirContext->LongNameU.Length, BufferLength - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName));
RtlCopyMemory(pInfo->FileName,
DirContext->LongNameU.Buffer,
BytesToCopy);
RtlCopyMemory(pInfo->FileName,
DirContext->LongNameU.Buffer,
BytesToCopy);