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