Author: pschweitzer Date: Sun Apr 6 21:02:21 2014 New Revision: 62676
URL: http://svn.reactos.org/svn/reactos?rev=62676&view=rev Log: [CDFS] - Fix CdfsWSubString() prototype - Use it in CdfsCreateFCB() for string copy
CID #511047
Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c
Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/fc... ============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Sun Apr 6 21:02:21 2014 @@ -57,7 +57,7 @@
static VOID -CdfsWSubString(PWCHAR pTarget, const PWCHAR pSource, size_t pLength) +CdfsWSubString(LPWSTR pTarget, LPCWSTR pSource, size_t pLength) { wcsncpy (pTarget, pSource, pLength); pTarget [pLength] = L'\0'; @@ -76,7 +76,7 @@
if (FileName) { - wcscpy(Fcb->PathName, FileName); + CdfsWSubString(Fcb->PathName, FileName, sizeof(Fcb->PathName) / sizeof(Fcb->PathName[0]) - 1); if (wcsrchr(Fcb->PathName, '\') != 0) { Fcb->ObjectName = wcsrchr(Fcb->PathName, '\');