ntdll: Fix buffer allocation size in get_env_var().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-04-21 17:06:43 +02:00
parent 5549ad21b3
commit aaa501fe93
1 changed files with 1 additions and 1 deletions

View File

@ -2593,7 +2593,7 @@ static NTSTATUS get_env_var( const WCHAR *name, SIZE_T extra, UNICODE_STRING *re
for (;;)
{
ret->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, size );
ret->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, size * sizeof(WCHAR) );
status = RtlQueryEnvironmentVariable( NULL, name, wcslen(name),
ret->Buffer, size - extra - 1, &len );
if (!status)