[KERNEL32] Use proper size for allocating buffer in GetVolumeInformationA(). This...
authorPierre Schweitzer <pierre@reactos.org>
Sat, 14 Oct 2017 21:19:12 +0000 (23:19 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 14 Oct 2017 21:19:12 +0000 (23:19 +0200)
This fixes JRE7 setup.
This regression was brought in by r75969.

CORE-13888

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)