mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
userenv/tests: Fix buffer overrun.
This commit is contained in:
parent
955adcbce9
commit
9d54392ca9
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ static BOOL get_env(const WCHAR * env, const char * var, char ** result)
|
|||
{
|
||||
envlen = lstrlenW(p);
|
||||
sprintf(buf, "%s", userenv_dbgstr_w(p));
|
||||
if (CompareStringA(GetThreadLocale(), NORM_IGNORECASE|LOCALE_USE_CP_ACP, buf, varlen, var, varlen) == CSTR_EQUAL)
|
||||
if (CompareStringA(GetThreadLocale(), NORM_IGNORECASE|LOCALE_USE_CP_ACP, buf, min(envlen, varlen), var, varlen) == CSTR_EQUAL)
|
||||
{
|
||||
if (buf[varlen] == '=')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue