From b3f5d3a6f8dcc90fba8e8d23396f9d4c735da16c Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Thu, 2 Jan 2003 16:03:56 +0000 Subject: [PATCH] Added a terminating 0 in vfatGetFCBForFile. Vfat has used the buggy implementation of wcsncpy. svn path=/trunk/; revision=3917 --- reactos/drivers/fs/vfat/fcb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/fs/vfat/fcb.c b/reactos/drivers/fs/vfat/fcb.c index eb81452b894..02ae65cdb5f 100644 --- a/reactos/drivers/fs/vfat/fcb.c +++ b/reactos/drivers/fs/vfat/fcb.c @@ -1,4 +1,4 @@ -/* $Id: fcb.c,v 1.23 2002/12/15 17:01:51 chorns Exp $ +/* $Id: fcb.c,v 1.24 2003/01/02 16:03:56 hbirr Exp $ * * * FILE: fcb.c @@ -590,6 +590,7 @@ vfatGetFCBForFile (PDEVICE_EXTENSION pVCB, currentElement = wcsrchr(pFileName, L'\\'); wcsncpy(pathName, pFileName, currentElement - pFileName); + pathName[currentElement - pFileName] = L'\0'; currentElement++; FCB = vfatGrabFCBFromTable(pVCB, pathName);