ntdll: Fix buffer allocation size in get_env_var().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5549ad21b3
commit
aaa501fe93
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue