[CDFS]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 16 Nov 2015 11:01:36 +0000 (11:01 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 16 Nov 2015 11:01:36 +0000 (11:01 +0000)
- Don't access file name buffer if its Length is zero in CdfsMakeAbsoluteFilename
CORE-10459

svn path=/trunk/; revision=69896

reactos/drivers/filesystems/cdfs/create.c

index d0c8010..1cac86c 100644 (file)
@@ -50,7 +50,8 @@ CdfsMakeAbsoluteFilename(PFILE_OBJECT FileObject,
     /* verify related object is a directory and target name
     don't start with \. */
     if ((Fcb->Entry.FileFlags & FILE_FLAG_DIRECTORY) == 0 ||
-        RelativeFileName->Buffer[0] == L'\\')
+        (RelativeFileName->Length >= sizeof(WCHAR) &&
+         RelativeFileName->Buffer[0] == L'\\'))
     {
         return STATUS_INVALID_PARAMETER;
     }