[KERNEL32] Fix buffer size for allocation in GetVolumeInformationW(). This fixes...
authorPierre Schweitzer <pierre@reactos.org>
Sun, 15 Oct 2017 08:43:49 +0000 (10:43 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 15 Oct 2017 08:43:49 +0000 (10:43 +0200)
dll/win32/kernel32/client/file/volume.c

index 90016b8..ba0ef82 100644 (file)
@@ -253,6 +253,10 @@ GetVolumeInformationW(IN LPCWSTR lpRootPathName,
         RootPathName = lpRootPathName;
     }
 
+    /* Convert length to bytes */
+    nVolumeNameSize *= sizeof(WCHAR);
+    nFileSystemNameSize *= sizeof(WCHAR);
+
     /* Convert to NT name */
     if (!RtlDosPathNameToNtPathName_U(RootPathName, &NtPathName, NULL, NULL))
     {