mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FASTFAT] Fix FastFAT not returning short name for FAT volumes in FileBothDirectoryInformation case
This is likely due to a copy paste error where long name was copied twice and short never. Fun fact: this was not affecting FATX volumes Fun fact2: this was defeating a buffer overflow check and thus was allowing buffer overflow! CORE-14088
This commit is contained in:
parent
48250aef6e
commit
18d6584da4
1 changed files with 4 additions and 3 deletions
|
@ -427,9 +427,10 @@ VfatGetFileBothInformation(
|
|||
{
|
||||
pInfo->ShortNameLength = (CCHAR)DirContext->ShortNameU.Length;
|
||||
|
||||
RtlCopyMemory(pInfo->FileName,
|
||||
DirContext->LongNameU.Buffer,
|
||||
DirContext->LongNameU.Length);
|
||||
ASSERT(pInfo->ShortNameLength / sizeof(WCHAR) <= 12);
|
||||
RtlCopyMemory(pInfo->ShortName,
|
||||
DirContext->ShortNameU.Buffer,
|
||||
DirContext->ShortNameU.Length);
|
||||
|
||||
/* pInfo->FileIndex = ; */
|
||||
|
||||
|
|
Loading…
Reference in a new issue