Commit aaa501fe authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Fix buffer allocation size in get_env_var().

parent 5549ad21
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment