mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[CDFS]
Fix a buffer overrun that was corrupting the FCB. See issue #4086 for more details. svn path=/trunk/; revision=54072
This commit is contained in:
parent
756c9d6dc2
commit
48afa1dc33
1 changed files with 2 additions and 1 deletions
|
@ -325,7 +325,8 @@ CdfsFindFile(PDEVICE_EXTENSION DeviceExt,
|
|||
DPRINT("PathName '%S' ObjectName '%S'\n", Fcb->PathName, Fcb->ObjectName);
|
||||
|
||||
memcpy(&Fcb->Entry, Record, sizeof(DIR_RECORD));
|
||||
wcsncpy(Fcb->ObjectName, name, MAX_PATH);
|
||||
wcsncpy(Fcb->ObjectName, name, min(wcslen(name) + 1,
|
||||
MAX_PATH - wcslen(Fcb->PathName) + wcslen(Fcb->ObjectName)));
|
||||
|
||||
/* Copy short name */
|
||||
Fcb->ShortNameU.Length = ShortName.Length;
|
||||
|
|
Loading…
Reference in a new issue