Fixed a string overrun.
authorEric Kohl <eric.kohl@reactos.org>
Sat, 14 Jul 2001 18:21:23 +0000 (18:21 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 14 Jul 2001 18:21:23 +0000 (18:21 +0000)
Patch by Hartmut Birr.

svn path=/trunk/; revision=2059

reactos/drivers/fs/vfat/fcb.c

index 1a47eed..72615fb 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fcb.c,v 1.4 2001/07/05 01:51:52 rex Exp $
+/* $Id: fcb.c,v 1.5 2001/07/14 18:21:23 ekohl Exp $
  *
  *
  * FILE:             fcb.c
@@ -584,7 +584,8 @@ vfatGetFCBForFile (PDEVICE_EXTENSION  pVCB,
       {
         *pParentFCB = parentFCB;
         *pFCB = NULL;
-        if (vfatGetNextPathElement (vfatGetNextPathElement (currentElement) + 1) == 0)
+        currentElement = vfatGetNextPathElement(currentElement);
+        if (*currentElement == L'\0' || vfatGetNextPathElement(currentElement + 1) == 0)
         {
           return  STATUS_OBJECT_NAME_NOT_FOUND;
         }