mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 02:08:30 +00:00
[KERNEL32] Use proper size for allocating buffer in GetVolumeInformationA(). This was leading to allocate a too small buffer under certain conditions and to overrun it.
This fixes JRE7 setup. This regression was brought in by r75969. CORE-13888
This commit is contained in:
parent
8dea67f8ba
commit
dc8bfeabcf
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ GetVolumeInformationA(IN LPCSTR lpRootPathName,
|
||||||
/* If caller wants file system name, allocate a buffer to receive it */
|
/* If caller wants file system name, allocate a buffer to receive it */
|
||||||
if (lpFileSystemNameBuffer != NULL)
|
if (lpFileSystemNameBuffer != NULL)
|
||||||
{
|
{
|
||||||
FileSystemNameU.MaximumLength = sizeof(WCHAR) * (nVolumeNameSize + 1);
|
FileSystemNameU.MaximumLength = sizeof(WCHAR) * (nFileSystemNameSize + 1);
|
||||||
FileSystemNameU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0,
|
FileSystemNameU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0,
|
||||||
FileSystemNameU.MaximumLength);
|
FileSystemNameU.MaximumLength);
|
||||||
if (FileSystemNameU.Buffer == NULL)
|
if (FileSystemNameU.Buffer == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue