[KERNEL32] Use proper size for allocating buffer in GetVolumeInformationA(). This...
[reactos.git] / dll / win32 / kernel32 / client / file / volume.c
index e59c291..90016b8 100644 (file)
@@ -87,7 +87,7 @@ GetVolumeInformationA(IN LPCSTR lpRootPathName,
     /* If caller wants file system name, allocate a buffer to receive it */
     if (lpFileSystemNameBuffer != NULL)
     {
-        FileSystemNameU.MaximumLength = sizeof(WCHAR) * (nVolumeNameSize + 1);
+        FileSystemNameU.MaximumLength = sizeof(WCHAR) * (nFileSystemNameSize + 1);
         FileSystemNameU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0,
                                                     FileSystemNameU.MaximumLength);
         if (FileSystemNameU.Buffer == NULL)