mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 14:40:50 +00:00
kernel32: Limit the environment variable size to 32767 in GetEnvironmentVariable.
This commit is contained in:
parent
b6d0df6a31
commit
515b8bebb6
|
@ -176,6 +176,8 @@ DWORD WINAPI GetEnvironmentVariableA( LPCSTR name, LPSTR value, DWORD size )
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* limit the size to sane values */
|
||||
size = min(size, 32767);
|
||||
if (!(valueW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR))))
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue